Re: grep
From: Barry Kimelman (barryk2_at_SPAM-KILLER.mts.net)
Date: 04/30/03
- Next message: Alexis Huxley: "Re: space in command line args"
- Previous message: Will Renkel: "RE: Newbie procmail/script problem"
- In reply to: sinapsi: "grep"
- Next in thread: Stephane CHAZELAS: "Re: grep"
- Reply: Stephane CHAZELAS: "Re: grep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Apr 2003 08:26:52 -0500
[This followup was posted to comp.unix.shell]
In article <D2yra.20715$3M4.588359@news1.tin.it>, sinapsi (info@zam.it)
says...
> I would like to grep in a file two pattern.
>
> Have I to do:
>
> grep pattern1 file
> grep pattern2 file
>
> Maybe is there a better way?
>
> thnx
> Dopamina
> cyberunners.org
You can use the "-e" option to specify patterns on grep (and egrep)
grep -e pattern1 pattern2 file
-- --------- Barry Kimelman Winnipeg, Manitoba, Canada email : bkimelman@hotmail.com
- Next message: Alexis Huxley: "Re: space in command line args"
- Previous message: Will Renkel: "RE: Newbie procmail/script problem"
- In reply to: sinapsi: "grep"
- Next in thread: Stephane CHAZELAS: "Re: grep"
- Reply: Stephane CHAZELAS: "Re: grep"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]