Rappels :
- Les opérateurs -a et -o sont respectivement remplacés par && et ||
- Les parenthèses n'ont plus besoin d'être protégées
| Commande test ( [ ] ) | Commande [[ ]] | Signification | 
|---|---|---|
| \(.....\) | (.....) | Regroupement d'expressions | 
| ! | ! | Négation | 
| -a | && | ET logique | 
| -o | || | OU logique | 
Exemple avec la commande test :
if [ -w $fic1 -a \( -e $rep1 -o -e $rep2 \) ]
then
.....
Exemple avec la commande [[ ]] :
if [[ -w $fic1 && ( -e $rep1 || -e $rep2 ) ]]
then
.....