in reply to Count similar characters in a row
perl -wle 'while(<>) { $count++ if "rrr" eq join "",(split)[1 .. 3] }; print $count' my_column_file.txt 3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Count similar characters in a row
by jwkrahn (Abbot) on Oct 06, 2010 at 16:00 UTC |