13,420
edits
Changes
→Using Control Flow Statements in Shell Scripts
'''Logic Statements'''
A logic statement is used to determine which Linux commands to be executed based<br>on the result of a condition (i.e. TRUE (zero value) or FALSE (non-zero value)).
<table align="right"><tr valign="top"><td>[[Image:logic-1.png|thumb|right|150px|Examples of simple comparisons using the test command.]]</td><td>[[Image:loop-1.png|thumb|right|150px|Examples of using additional comparisons using the test command.]]</td></table>
There are several logic statements, but we will just concentrate on the if statement.