Shell script foreach help

view story

http://www.unix.com – I am writing a shell script to uncompress files in a directory, then call a Perl script to search the files for given terms, store those terms in a different output file , and compress the output. I get a syntax error with my use of foreach. Below is my script. Code: #!/bin/csh -fxv if (! $#argv==1); then     echo "[fail, not enough input arguments]"     exit 10 else     echo "the pitch and kinf will be stored in a new file called" $1     echo " " endif rm $1 # uncompress output files in directory set lis (HowTos)