The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: shell scripting
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 09-11-2008
kaustav_pal kaustav_pal is offline
Registered User
  
 

Join Date: Mar 2008
Location: Kolkata, India
Posts: 4
well put all the matching patterns in single file say pattern.dat

then you can use following

Quote:
cat pattern.dat
sample.gz
sample1.gz

grep -f pattern.dat source_file
you can manipulate contents of pattern.dat and get matchings accordingly