Estructura del if en la bash

if list; then list; [ elif list; then list; ] ... [ else list; ] fi

The if list is executed. If its exit status is zero, the then
list is executed. Otherwise, each elif list is executed in
turn, and if its exit status is zero, the corresponding then
list is executed and the command completes. Otherwise, the else
list is executed, if present. The exit status is the exit sta-
tus of the last command executed, or zero if no condition tested