IF condition syntax with examples in Linux / Unix
There are many conditions and loops are used in Linux / Unix shell scripting. In this post i am going to explain about IF condition syntax and with an example in Linux / Unix.
The ‘if’ statement evaluates a condition which accompanies its command line.
#cat > if.sh
if [ a > b ]
echo “$a is greater than $b”
echo “$b is greater than $a”
OK!. Lets execute the script and see the output. Previously we have seen how to execute a shell, Perl and python script in linux.
10 is greater than 15