Open main menu

CDOT Wiki β

Changes

Tutorial12: Shell Scripting - Part 2

4 bytes added, 15:58, 30 November 2020
Additional Logic Statements
''Example:''
<span style="font-family:courier;font-weight:bold;">num1=5<br>num2=10<br>if test $num1 –lt $num2<br>then <br> &nbsp;&nbsp;&nbsp;echo “Less Than”<br>elif test $num1 –gt $num2<br>then<br> &nbsp;&nbsp;&nbsp;echo “Greater Than”<br>else &nbsp;&nbsp;&nbsp;echo “Equal to”<br>fi</span><br><br>
===Additional Loop Statements===
13,420
edits