Monday, May 19, 2008

Bourne Shell Tutorial - Loop Iteration

#!/bin/sh
for variable in word ...
do
command
done
# For example:
for i in `cat $LOGS`
do
mv $i $i.$TODAY
cp /dev/null $i
chmod 664 $i
done

No comments:

Search the Web