13,420
edits
Changes
→Using Control Flow Statements in Shell Scripts
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 Example of simple comparisons using the test command'''if''' logic control-flow statement.]]</td><td>[[Image:loop-1.png|thumb|right|150px|Examples Example of using additional comparisons using the test command'''for''' looping control-flow statement.]]</td></table>
There are several logic statements, but we will just concentrate on the if statement.