# Trying to write a shell script
# Date : Aug 4th 2000
# See what happens! :-)


PATH1="/tftpboot"

ls -1 ./$direct/ > filelist
let track=2
let linecount=0
linecount=`wc -l filelist | tr -s " " | cut -f 2 -d " "`
linecount=`expr $linecount + 0`

while [ $track -le $linecount ] 
do
codedfile=`head -$track filelist | tail -1`
let track=track+1
echo $codedfile > tempfile
sourcefile=`cat tempfile | cut -c 1-6`
echo $sourcefile >> result
echo $codedfile >> result
./psqm ./origul/$sourcefile.ul ./$direct/$codedfile 1000000 | grep PSQM >> result
echo "*************************************************" >> result
done

    Source: geocities.com/shezy22/code

               ( geocities.com/shezy22)