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 08-21-2007
lalelle lalelle is offline
Registered User
 

Join Date: Aug 2007
Posts: 40
grep the pattern followed by newline

Hi
I have a problem using grep to find a pattern followed by newline.
Here is my file
xxxxxxxxxxxpattern
patternxxxxxx
pattern
xxxpattern
xxpatternx
xxxxxxyyyyxxxx


I want the result to be like this
xxxxxxxxxxxpattern
pattern
xxxpattern

Please help
Reply With Quote
Remove advertisements
!!
Forum Sponsor