Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

You are in a directory with a large number of FIX logs that are over 1GB in size. You have a text file containing the names of 10 of those files. How can you search for all messages containing “50=MSFT”, only in those ten files?

share|improve this question
up vote 1 down vote accepted

If those filenames do not contain newlines and are one per line in the text file you can do:

cat file_with_filenames | xargs grep -F '50=MSFT'

(You can include the double quotes if they are part of the search string).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.