Sorry, I ommitted the $i variable...
Code:
for i in stringsfile.txt; do grep -e $i filename.txt; done
Or,
Code:
for i in ABCD HIJK LMNO PQRS TUVW; do grep -e $i filename.txt; done
So here's a hypothetical example of a string that I'm searching for an exact match on:
ABCD
I know this string exists in the master file that I'm grepping, but I need to see additional information about it (it's a database item that I need to configure).
So in the master file I'm grepping, there are many lines with strings that contain ABCD:
1234 ABCD char 100 # Description of what it is used for
1235 ABCD_History char 100 # Description of what it is used for
1236 Admin_ABCD char 100 # Description of what it is used for
1237 "ABCD Billing" char 100 # Description of what it is used for
Now the only one I'm interested in returning is the ABCD line, but my search using a loop will return all the lines listed above. I need to see this line because it tells me this is a character type (vs float) and it can hold 100 characters.
Hope this helps, and thanks for responding.