Bash Scripting - Loops
Identify the error in this script:
for i in 1 2 3; do
if [ $i -eq 2 ]
continue
fi
echo $i
donefor i in 1 2 3; do
if [ $i -eq 2 ]
continue
fi
echo $i
doneif statement requires a semicolon or newline before the command inside it.continue is on the next line without a semicolon or newline after the condition, causing syntax error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions