I am trying to compose a
grep statement and it is killing me. I am also tired of getting the
arguments list too long error. I have a file, let's call it
subset.txt. It contains hundreds of lines with specific strings such as
MO43312948. In my object directory I have thousands of files and I need to copy all the files that contain the strings listed in
subset.txt into another directory.
I was trying to start with this to just return the matching files from the objects directory.
grep -F "$(subset.txt)" /objects/*
I keep getting `bash: /bin/grep: Argument list too long``