in reply to find a string and count of its occurence in a text file
i read that using grep is not advisable for huge files
Someone lied to you.
You probably want something like this:
while ( <FILE> ) { print if 'abc' eq ( split /:/ )[ 0 ]; }
Or possibly this:
while ( <FILE> ) { print if /^abc:/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: find a string and count of its occurence in a text file
by dwu (Monk) on Nov 14, 2007 at 05:53 UTC | |
|
Re^2: find a string and count of its occurence in a text file
by cdarke (Prior) on Nov 14, 2007 at 09:27 UTC | |
by Anonymous Monk on Nov 14, 2007 at 18:44 UTC |