Sigh....
Please, STOP USING C-shell while you still can!
C-shell (csh) is considered outdated, very buggy, unreliable and generally to be avoided. Read
this in-depth article instead of taking my word for it.
You might want to consider getting a book on shell programming. I suggest "KornShell Programming Tutorial" (Korn shell 88) or the "Hands-On KornShell93 Programming" (Korn shell 93), both by Barry Rosenberg. Both are phantastic reads, humorous writing along with excellent coverage of the subject.
I hope this helps.
bakunin
PS: there is even a logical flaw in your script: even if your number of arguments is correct you are not guaranteed that the user provided a valid file name. You will have to test if the file exists and is readable (use
test -r <filename> for this) before piping it through
grep or any other utility.