Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!bloom-beacon!eru!hagbard!sunic!dkuug!iesd!news From: claus@iesd.auc.dk (Claus S. Jensen) Newsgroups: comp.unix.questions Subject: batch file Message-ID: <1990Dec2.211810.2302@iesd.auc.dk> Date: 2 Dec 90 21:18:10 GMT Sender: news@iesd.auc.dk (UseNet News) Organization: CS and Math, University of Aalborg, Denmark Lines: 20 I am trying to make a batch file, that looks through a number of textfiles for a string. I've made up something like this, but it doesn't work. Can anybody tell me why this is, and perhaps if there is another way to do it. #!/bin/tcsh foreach file ($1) echo $file cat $file | grep $2 end Claus S.Jensen -- ######################################################################## # Claus S.Jensen , claus@iesd.auc.dk # # University of Aalborg, Denmark # ########################################################################