The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to grep for lines between 2 give patterns? melanie_pfefer Shell Programming and Scripting 1 04-03-2008 08:38 AM
How to cut multiple patterns from a file? Vijay06 Shell Programming and Scripting 5 11-26-2007 06:38 PM
Grep for Multiple patterns WillImm123 Shell Programming and Scripting 7 03-01-2006 01:23 PM
Grep multiple patterns malaymaru Shell Programming and Scripting 4 09-24-2005 10:20 PM
grep for multiple patterns tselvanin UNIX for Dummies Questions & Answers 1 11-12-2003 04:43 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-08-2008
Read Only
 

Join Date: Jun 2006
Posts: 105
grep patterns - File

Hi
I have 3 patterns for example to be searched.
These three patterns are available in file1.

The patterns to be searched are in file2.

I want to search the pattern of file1 to file2.

Can any one help with example?

Regards
Dhana
Reply With Quote
Forum Sponsor
  #2  
Old 05-08-2008
 

Join Date: Nov 2007
Location: 45.48-73.63
Posts: 736
Code:
grep -f patterns.file data.file
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:13 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0