if
statementThe most compact syntax of the
if
command is:
if TEST-COMMANDS; then CONSEQUENT-COMMANDS; fiThe TEST-COMMAND list is executed, and if its return status is zero, the CONSEQUENT-COMMANDS list is executed. The return status is the exit status of the last command executed, or zero if no condition tested true. Expression used with
if
[-s FILE]
: True if FILE exists and has a size greater than zero.
No comments :
Post a Comment