August 2000
Intermediate to advanced
816 pages
29h 45m
English
if
if test-cmds
Begin a conditional statement. Possible formats are:
iftest-cmdsiftest-cmdsiftest-cmdsthen then thencmds1cmds1cmds1fi else eliftest-cmdscmds2then ficmds2... elsecmdsnfi
Usually, the initial if and any elif lines execute one test or [] command (although any series of commands is permitted). When if succeeds (that is, the last of its test-cmds returns 0), cmds1 are performed; otherwise each succeeding elif or else line is tried.
Read now
Unlock full access