The UNIX and Linux Forums  

Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #7 (permalink)  
Old 10-09-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
That will only pick out the first occurrence, though. The original awk script would return all matching lines. Not hard to work around if you know any Perl, just mentioning in case you're new to this.

Last edited by era; 10-09-2008 at 04:44 AM.. Reason: first, not last occurrence (missed that -- thanks otheus)