Saturday, April 12, 2008

Shell Count Meme

history | awk '{{a[$2]++) END(for(i in a) {printf "%5d\t%s\n", a[i], i))' | sort -rn head

awk: line 1: extra ')'
awk: line 1: missing ( near END
awk: line 1: extra ')'
awk: line 2: missing } near end of file

Take that!
(actually I use tcsh which doesn't keep history between invocations. So this output is as interesting as it gets)

No comments: