![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grep question. | saurabhsinha23 | UNIX for Dummies Questions & Answers | 3 | 12-10-2007 10:58 PM |
| grep question | tim-bobby | UNIX for Dummies Questions & Answers | 4 | 10-05-2007 08:58 AM |
| Another grep question | kingdbag | UNIX for Dummies Questions & Answers | 6 | 10-26-2006 10:56 PM |
| grep & sed question | der Kopf | Shell Programming and Scripting | 1 | 11-22-2004 01:49 AM |
| Grep question | eloquent99 | UNIX for Dummies Questions & Answers | 4 | 02-20-2003 07:49 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Question about GREP
I have 2 files, in one file is a list of hex numbers, the other is what i need matched. Is it possible for me to specify to grep the list and have it go through the second file for each item in the list in the first file to match the lines? so this is like a cross-refference.
|
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Code:
grep -f file_with_hex_list file_to_be_matched |
|
#3
|
|||
|
|||
|
wow, thank you for the fast reply - i was looing all over the internet for how to do that with no avail.
|
|
#4
|
|||
|
|||
|
Quote:
is that the exact command? say "hexlist" is the list file and "searchlist" is the search file, i typed: Code:
grep -f hexlist searchlist > results |
|
#5
|
|||
|
|||
|
#6
|
|||
|
|||
|
Then all the lines in searchlist file should contain any one of hex numbers in hexlist file.
|
|
#7
|
|||
|
|||
|
Quote:
|
|||
| Google The UNIX and Linux Forums |
| Thread Tools | |
| Display Modes | |
|
|