#!/bin/bash
#This will not do as intended because it will use a subshell... will exec work? an alias? how?
history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -nr | head


syntax highlighted by Code2HTML, v. 0.9.1