in reply to Re: File search using Grep
in thread File search using Grep
I'm not sure whether the OP's use of grep implies that there might be more than one record with that ID but, if not, it might be an idea to avoid reading the rest of the file once you've found the record. Something like
$ perl -ne ' > next unless /9344151299/; > print; > last;' /tmp/Config1
I hope this is of interest.
Cheers,
JohnGG
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: File search using Grep
by Anonymous Monk on Jun 26, 2009 at 14:35 UTC | |
by zwon (Abbot) on Jun 26, 2009 at 19:20 UTC | |
by mzedeler (Pilgrim) on Jun 27, 2009 at 19:28 UTC |