Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.