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 the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 01-05-2009
kamranjalal kamranjalal is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 9
Hi,

Command awk '/pattern/{print s "\n" $0;exit}{s=$0}' file only returns the first occurance of the pattern, it is not showing the next occurance.

Please help me, thanks