in reply to Re: History Meme, in Perl!
in thread History Meme, in Perl!

Shorter:

system q(history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|s +ort -rn|head)

Replies are listed 'Best First'.
Re^3: History Meme, in Perl!
by kyle (Abbot) on Apr 11, 2008 at 20:37 UTC
    bash: system: command not found

    Not only that, "perl -e 'system q(history)'" produces no output, presumably because the subshell that perl spanws for system doesn't have a history.

      bash: system: command not found

      What in the world gave you the idea this was supposed to be a bash script? Aren't we golfing Perl?

      "perl -e 'system q(history)'" produces no output...

      Yowch. Now that is a problem. :-(