# Trying to write a shell script # Date : Aug 4th 2000 # See what happens! :-) PATH1="/tftpboot" clear echo " ********** Check from following options *************" echo "1- load10nv" echo "2- noloadnv" echo "3- load10v" echo "4- noloadv" read diroption case $diroption in 1) direct=load10nv ;; 2) direct=noloadnv ;; 3) direct=load10v ;; 4) direct=noloadv ;; *) echo "Press correct option please" sh test.sh ;; esac #ls -1 ./$direct/ > aulist #let track1=2 #let noofaufiles=0 #noofaufiles=`wc -l filelist | tr -s " " | cut -f 2 -d " "` #noofaufiles=`expr $noofaufiles + 0` #while [ track1 -le $linecount ] #do #aufile=`head -$track1 aulist | tail -1` #let track=track+1 #echo $aufile > tempaufile #ausource=`cat tempaufile` #audest= 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