I got a command
foo that output a list of files separated by
I am using the below command to filter the results by regex content of the files.
foo | xargs grep -l regex
The problem is that some files are very large and the content that I am searching can be found only at the first 10 lines. How can I tell grep to only process the first 10 lines in order to speed this execution?