in reply to System Call for various serials in a for loop
You ought to read the man page for grep. Not every problem is a perl problem:
grep -F -f serials.txt logs* >serials.log
if you want to use perl, then you don't really need grep, either:
# Code to load serial numbers into @serials goes here... while (<>) { for my $serial (@serials) { if (0 >= index($_, $serial) { print $_; next; } } }
...roboticus
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: System Call for various serials in a for loop
by RMGir (Prior) on Jun 28, 2007 at 12:00 UTC |