Monday, March 3, 2008

For loop in bash

C-style::
for ((i=9;i<=$sleeptime;i++))
do ... ...
done

Bash-style::
for each pid in $pids
do
... ...
done