Fixed empty parameter bug

This commit is contained in:
fnuesse
2018-06-14 19:59:32 +02:00
parent ab9e044ad7
commit 3d8f7c619c
3 changed files with 114 additions and 81 deletions

21
printparams Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
#Iterate over the parameter to find all entered ones
for var in "$@"
do
if [[ "$var" = '' ]]
then
shift
fi
done
i=0;
for var in "$@"
do
echo "$i. $var"
i=$((i+1))
done