The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-15-2008
eliewadi eliewadi is offline
Registered User
 

Join Date: May 2008
Posts: 1
HOW to egrep fo a pattern

Hi,

I want to use egrep to match this expression in my file. The expression begins with the word SCHEDULE and ends with PFTDGNIN. In between these 2 words there can be anything.

EX: Line1: SCHEDULE NWERRR#PFTDGNIN
Line2: FOLLOWS NWD@AAS#PFTDGNIN

So as a result of the egrep command ONLY line 1 needs to be returned.

How can I do that.

Thanks
Reply With Quote
Forum Sponsor