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 04-28-2008
drl's Avatar
drl drl is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2007
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 705
Hi.
Quote:
Originally Posted by meevagh View Post
... I prob could have explained it a bit better. ...
Changing 4 characters in the regular expression allows:
Code:
% ./p3 data1 data2 data3

 -----
 File contains:
United
Champions
Liverpool
Losers
Torres

 Oh, a miss!

 -----
 File contains:
United
Champions
Ronaldo
Liverpool
Losers
Torres

 Hit!

 -----
 File contains:
United
Champions
Liverpool
Losers
Torres
Ronaldo

 Oh, a miss!
Best wishes ... cheers, drl