Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!purdue!bu-cs!dartvax!coat.com From: andyb@coat.com (Andy Behrens) Newsgroups: comp.unix.questions Subject: Re: the care and feeding of fgrep Message-ID: <17245@dartvax.Dartmouth.EDU> Date: 24 Nov 89 18:53:06 GMT References: <453@nixba.UUCP> Sender: news@dartvax.Dartmouth.EDU Reply-To: andyb@coat.com Organization: Burlington Coat Factory Warehouse Lines: 23 In article <453@nixba.UUCP> mike@nixba.UUCP (Mike Lyons) writes: > "Fgrep patterns are fixed strings." My question is, how the heck do > you give a list of strings as an arg to fgrep? You separate them with newlines. The way you type the newlines depends on which shell you are using. #! /bin/sh #! /bin/csh fgrep 'string1 fgrep 'string1\ string2 string2\ string3' files string3' files (You can use "" instead of '' if you prefer). -- Live justly, love gently, walk humbly. Andy Behrens andyb@coat.com uucp: {uunet,rutgers}!dartvax!coat.com!andyb RFD 1, Box 116, East Thetford, Vt. 05043 (802) 649-1258 Burlington Coat, PO Box 729, Lebanon, N.H. 03766 (603) 448-5000