Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Grepping text from one file in another file

$
0
0
Hello,
I have a file with a large number of words each listed in sequential order one word per line.
Quote:

a
b
c
d
I want to search these words in another file which has the structure
Quote:

a=x
b=y
c=p
e=q
Both the files are large, but the words in the sourcefile are all available in the target file.
I tried to grep the data using grep, but the older grep (8 bit) which supported such a procedure, is not supported in new grep.: grep 32 bit.
Maybe the syntax is different but I get the following:
Quote:

C:\Users\XP-HOME\Desktop>grep32
GREP Ver 1.0.0 (32 bit version for Windows NT)
Usage: grep [-bcilmnsvq? -dnnn] "pattern" file1 file2 ... [>ofile] [>>ofile]
Try as I will I have not been able to grep the file. Any suggestions and help for alternate methods: awk or Perl would be really welcome.
My OS is Vista/Win7 hence the request.

Viewing all articles
Browse latest Browse all 16232

Trending Articles