Hi
I have a small question about bash scripting
this is the snippet I'm asking about
Code:
#!/bin/bash
echo
while [ -n "$1" ]
do
case "$1" in
-a) echo "Found the -a option" ;;
-b) echo "Found the -b option" ;;
-c) echo "Found the -c option" ;;
*) echo "$1 is not an option" ;;
esac
shift
done
I got this from a tutorial
https://likegeeks.com/linux-bash-scr...e-guide-part3/
Why do we need double semicolon after each option
I tried to remove the semicolon it gives me this error
Code:
syntax error near unexpected token `)'
thanks in advance.