Folks
I've been struggling this with for far too liong now and need your help!
I've been happily using grep for a search of a directory, to list the files which contain a string:
find . -type f -mtime -5 -print | xargs grep -l 'invoiceID=\"12345\"'
Now the list of 'invoiceID' I am looking for is getting huge so I was hoping to list them all in a pattern list.
The string for the files I'm searching through are always in the format invoiceID="12345"
I've created a file Pattern.txt
> cat Pattern.txt
'invoiceID=\"12345\"'
'invoiceID=\"23456\"'
'invoiceID=\"34567\"'
...and three corresponding files
> cat Files*
Value"12" invoiceID="12345" Number"45"
Value"23" invoiceID="23456" Number"56"
Value"34" invoiceID="34567" Number"67"
When I run the following, it doesn't find anything:
find . -type f -mtime -5 -print | xargs grep -l -f Pattern.txt
I've tried numerous other formats, without success.
Any ideas ?!!??
Dave.