1
I’m new and I’m having trouble with the script below:
echo "Enter an A, B or C"
read letter
if [[ $letter == "A" || $letter == "a" ]];
then
echo "this is A"
elif
[[ $input == "B" || $input == "b" ];
then
echo "this is B"
elif
[ $input == "C" || $input == "c" ];
echo "this is C"
set -x
fi
error: syntax error near Unexpected token `fi'
Why the last
elif
doesn’t have athen
?– Woss
lack the
then
at lastelif
or replace byelse
– Alessandro Schneider