Memento shell

#!/bin/bash
#
# description: 
#
# Maintener: guillaume.moulard@orange.com
set -x
if [ $# -eq 0 ]; then
echo call: ./proxyTestVIP.sh VIPNAME
fi


# see man test pour tout les -eq -ne -lt -le -gt -ge possible 
#voir aussi man bash
if [ $? -eq 0 ]; then
        echo GOOD
else
        echo BAD
fi 


# tableaux
TAB=() 
TAB[1]="ps -ef"
TAB[2]=${TAB[1]:4:3}


for i in $(seq 0 ${#TAB[@]}); do 
        echo TAB[i]
done

or
for i in ../epita/ING1/s5/project/moular_b-myfind/src/*
or 
for i m1 m2 ; do

case $1 in
  "GQR") TLD=omrq ; N=qpr-sd-prxgin ;;
  "GQN") TLD=omnq ; N=qpn-sd-prxgin ;;
  *) echo bad parameter :GQR, GQN ; exit 1 ;;
esac


for name [ [ in [ word ... ] ] ; ] do list ; done
for (( expr1 ; expr2 ; expr3 )) ; do list ; done
select name [ in word ] ; do list ; done
case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac
if list; then list; [ elif list; then list; ] ... [ else list; ] fi
while list-1; do list-2; done
until list-1; do list-2; done
           
#function
testfunct () { 
#$1=A
echo testOneVIP $1, $2
}
testfunct A B