DEV Community

Discussion on: What are your UNIX pipeline commands that saved you from lot of coding/time?

Collapse
 
bertvv profile image
Bert Van Vreckem
topcmd ()
{ 
    history | awk '{a[$4]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head
}

This prints the top 10 most used commands in the history. I then created one-letter aliases for these (e.g. alias s='git status'), saving numerous keystrokes.