Last active
January 25, 2019 19:16
-
-
Save nr1q/44b8d84e5613ae5c43bb2220fc0ac7f6 to your computer and use it in GitHub Desktop.
Get history list without duplicates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat ~/.bash_history | nl | sort -k 2 | awk '{$1=$1};1' | uniq -f1 | sort -n | cut -d ' ' -f 2- > ~/.bash_history_noduplicates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment