equal: STRING1 = STRING2 not equal: STRING1 != STRING2
fret=$? # get func ret code if [ $fret != 0 ] ; then # wget returned error $echo "Download error.\nNo log written." else
[ "0$show" -ge "2" ] && set -xv [ "0$show" -eq "1" ] && set -x
INTEGER1 -eq INTEGER2 INTEGER1 is equal to INTEGER2
-ge -gt -le -lt -ne
[-n] STRING the length of STRING is nonzero
-z STRING the length of STRING is zero
[ -n "$Trig1" -a -n "$Trig1" ] && { action if both trigger is set. } [ -z "$Trig1" -a -z "$Trig1" ] || { action if either trigger is set }
[ "$Trig1" -o "$Trig1" ] || { [ -z "$Trig1" -a -z "$Trig1" ] && { action if neither trigger is set. ie, if either trigger is set, there will be no such action. }
True if either EXPR1 or EXPR2 is true.
$ [ "T" -a "" ] && echo yes
$ [ "T" -a "T" ] && echo yes yes
$ [ "" -a "T" ] && echo yes
$ touch aa $ dir aa -rw------- 1 suntong glan 0 Dec 7 13:19 aa $ [ -f aa ] && echo aa aa $ [ -s aa ] && echo aa $