Παράδειγμα:
NAME=john ls -rtl cat foo bar >foobar calc_pi &
Παράδειγμα:
ls -l | more ! grep check file
Παράδειγμα:
mail john <foo && rm foo cat foo >bar || echo "Unable to read foo" ls /tmp ; ls /dev
for name [ in word; ] do list ; done
Παράδειγμα:
for fname in *.c do ls -l $fname cat $fname done
case word in [ pattern [ | pattern ] ... ) list ;; ] ... esac
Παράδειγμα:
case $fname in *.c|*.for) echo Source file ; cat *.c ;; *.o) echo Object file ;; *) echo Other file ;; esac
if list_c1 then list_r1 [ elif list_c2 then list_r2 ] ... [ else list_r3 ] fi
Παράδειγμα:
if grep John /etc/passwd then echo John is a valid user else echo No user named John was found fi
while list1 do list2 done
Παράδειγμα:
while ! {finger | grep John ; } do sleep 10 done echo John left
$?
$1
$2
$ν
$*
Παράδειγμα:
myrm *.c Delete prog1.c (y/n)? y prog1.c deleted Delete prog2.c (y/n)? n Did not delete prog2.c