in reply to Counting lines as I write them...
can use it with anything along the lines of (note bash syntax for redirects):perl -ne '++$cts{$1} && print if /^(\*{3}M|\!{3}|\@{3})/; END { while( +my($k,$v)=each %cts){printf STDERR "Total errors for %s: %d\n", $k, $ +v;} }'
where "$ONELINER" represents the perl script pasted in, or an alias, or a 1 line script file w/the perl.$ONELINER somelog.txt >> dataload.errs 2> cts.txt cat somelog.txt | $ONELINER >> dataload.errs
|
|---|