in reply to Re: System Call for various serials in a for loop
in thread System Call for various serials in a for loop
I didn't know about that grep option.
For the perl approach, depending on the number of "serials", Regex::PreSuf might be able to turn @serials into one regex, which would likely be very ugly, but likely faster.
However, it's likely to be impossible to beat doing the grep -F -f and then post-processing the results file to split into separate serial files - for example, if the serial column is easily found, the sort program could sort the result by serial #, making the split very simple.
For bulk applications, /usr/bin/grep and /usr/bin/sort can sometimes beat perl's speed by large margins, so it's worth trying them.
|
|---|