Hacker News new | past | comments | ask | show | jobs | submit login

and answers by phind

# Perl perl -e 'print sort { $b <=> $a } map { /^.\s(.)$/; \$1 } <>' <(history | awk '{a[\$2]++}END{for(i in a){print a[i] " " i}}')

# Perl 6 (Raku) perl6 -e 'lines().map({m/^.\s(.)$/; \$0}).sort({-$^a}).say()' <(history | awk '{a[\$2]++}END{for(i in a){print a[i] " " i}}')

# J history | awk '{a[\$2]++}END{for(i in a){print a[i] " " i}}' | jconsole -je 'echo/:~1!:1]fread'''''

# Haskell ghc -e 'interact $ unlines . take 10 . reverse . sort . lines' <(history | awk '{a[\$2]++}END{for(i in a){print a[i] " " i}}')




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: