if statement

Here are the various forms of the if statement:

if command
then
commands
fi

Here fi denotes the end of the if statement.

if command
then
commands
else
commands
fi

if command
then
commands
elif
commands
else
commands
fi

if command; then commands; [ elif command; then commands; ] ... [ else commands; ] fi