diff --git a/scripts/ls-configs.sh b/scripts/ls-configs.sh index 444a0cf..c17d9b6 100755 --- a/scripts/ls-configs.sh +++ b/scripts/ls-configs.sh @@ -2,9 +2,10 @@ if [ ! -f "$DEVICE.conf" ]; then echo "No configuration: Use command 'init' to create configuration files" -else - echo "Configurations - sorted by creation date" - echo - echo "Server" - cat "$DEVICE.conf" | grep -e "# Client" -e "# <-" | grep -a "#" | sed "s/# //" | sed "s/<- //" | sed "s/\(.*\)\([0-9]\{4\}\)/Created: \1\2\n/" + exit 1 fi + +echo "Configurations - sorted by creation date" +echo +echo "Server" +cat "$DEVICE.conf" | grep -e "# Client" -e "# <-" | grep -a "#" | sed "s/# //" | sed "s/<- //" | sed "s/\(.*\)\([0-9]\{4\}\)/Created: \1\2\n/"