Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

9 bytes removed, 07:56, 27 July 2020
Additional Logic Statements
'''if-else Statements'''
If the test condition returns a TRUE value, then the Linux Commands between then and else statements are executed. If the test returns a FALSE value, then the the Linux Commands between the else and fi statements are executed.
Example:
num1=5�num25<br>num2=10<br>if test $num1 –lt $num2<br>then<br> &nbsp;&nbsp;&nbsp;echo “Less Than”<br>�elseelse<br>echo &nbsp;&nbsp;&nbsp;“Greater Than or Equal to”<br>fi
===Additional Loop Statements===
13,420
edits

Navigation menu