Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

How to print matching lines in grep

How to print matching lines in grep

You have 2 files and if you wants to print the matching line from one file to another use below command.

cat a.txt | while read i ; do grep “$i” b.txt ; done;

Comments are closed.