porque a sintaxe é apenas com um igual: [ $a = $b ]
if [ ! $a = $b ]; then #with space in condition and need instruction between then and fi, else doesn't works
...Script to execute...
elif [ ! $a = $c ]; then
...Script to execute...
else
...Script to execute...
fi
lista sh condicional
[ $a = $b ] && return 1 || return 0 conditionnal alternative format
if [ $a = $b -o $b = $c ] -o mean OR
if [ $a = $b -a $b = $c ] -a mean AND
if [ $a = $b -o $b = $c ] || [ $a = $b -a $a = $c ] multiple conditionnal or
if [ $a = $b -o $b = $c ] && [ $a = $b -a $a = $c ] multiple conditionnal and
if [ -z $a ] is empty or null
if [ ! -z $a ] not equal to ""
if [ -n $a ] is not empty or null
if [ $a -eq $b ] equal (numeric)
if [ $a -ne $b ] not equal (numeric)
if [ $a -gt $b ] greater than (numeric)
if [ $a -ge $b ] greater or equal than (numeric)
if [ $a -lt $b ] lower than (numeric)
if [ $a -le $b ] lower or equal than (numeric)
if [ -d $a ] is a directory
if [ -e $a ] file exist
if [ -f $a ] is a file
if [ -g $a ] is group allowed for the file
if [ -r $a ] is readable
if [ -s $a ] file is not 0kb
if [ -u $a ] is user allowed for file
if [ -w $a ] is writable
if [ -x $a ] is executable
mais com bash
if [[ "$a" =~ "$b" ]] match (reg exp)
if [[ $a == *$b* ]] match (glob)
if [ "${a/$b}" = $a ] match (string)
if [ -z "${a##*$b*}" ] match (string, work with dropbox !)
if [ ${a/$b} = $a ] match (string)