4 ms·
Don't do this: you have a bug when "$1" is ''. arg= while [[ "$#" -gt 0 ]]; do case "$1" in --arg) shift; arg="$1" ;; *) help
by sacnoradhq 4y ago
Don't do this: you have a bug when "$1" is ''.
arg=
while [[ "$#" -gt 0 ]]; do
case "$1" in
--arg) shift; arg="$1" ;;
*) help; exit 1 ;;
esac
shift
done
- BiteCode_dev 4y agoAnd that's why.