Fix help message generation in backup scripts allowing 0 parameter allowing scripts to accept '$' to show the help message.

This commit is contained in:
Captain ALM 2024-08-30 13:39:27 +01:00
parent 1e5bc85e48
commit 7c90b98a44
Signed by: alfred
GPG Key ID: 4E4ADD02609997B1
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
#/bin/bash #/bin/bash
if [ $# -eq 0 ]; then if [[ "$1" != '$' ]]; then
echo "Usage: list.sh [Storage disk root path]"; echo "Usage: list.sh [Storage disk root path]";
exit 2; exit 2;
fi fi

View File

@ -1,6 +1,6 @@
#/bin/bash #/bin/bash
echo "Verify All Backups!"; echo "Verify All Backups!";
if [ $# -eq 0 ]; then if [[ "$1" != '$' ]]; then
echo "Usage: verify-all.sh [Storage disk root path]"; echo "Usage: verify-all.sh [Storage disk root path]";
exit 2; exit 2;
fi fi