if
evaluates a commands (CMD
) exit status ($?). An exit status of 0 is considered true, all other status are considered false. if CMD; then ... ... fi
if CMD; then ... ... else ... ... fi
if CMD; then ... ... elif CMD2; then ... ... else ... ... fi