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 -->
  #5 (permalink)  
Old 02-28-2006
mahendramahendr mahendramahendr is offline
Registered User
 

Join Date: Dec 2005
Location: London
Posts: 222
Are you looking for this info ?

man grep :

-f pattern_file
Read one or more patterns from the file named by the
path name pattern_file. Patterns in pattern_file are
terminated by a NEWLINE character. A null pattern can
be specified by an empty line in pattern_file. Unless
the -E or -F option is also specified, each pattern
will be treated as a basic regular expression.


You can save all patterns in a file line by line and then

grep -f pattern_file Actual_file
Reply With Quote