1
for id in `cat ids|sort -rn|uniq`; do echo `grep -w $id ids|wc -l` :$id; done|sort -nr

Bash Groupping with stats

by gmarik.blogspot.com, November 01, 2008 12:37, 2 refactorings, tagged with bash, groupping

I was processing logs like ...

Avatar Talk
1
2
3
4
SCRIPT="gen_${1}.sql"
echo "--gen_${1}.sql" > $SCRIPT
typeset -i counter
...

Bash Slow bash for loop.

by furtive, February 07, 2008 19:57, 6 refactorings, tagged with bash, speed, loop

Here's a quick and dirty ba...

Avatar Talk