Monday, March 3, 2008

IF in bash

for numbers ::

if [ $n1 -eq 100 ]; then

for strings ::

if [ "$n1" == "100" ]; then

more than one condition ::

if [ $n1 -gt 100 ] || [ "$n2" == 0 ]; then