The bash history command is very cool. I understand why it shows the line numbers, but is there a way I can invoke the history command and suppress the line numbers?
The point here is to use the history command, so please don’t reply cat ~/.bash_history
Current Output:
529 man history
530 ls
531 ll
532 clear
533 cd ~
534 history
Desired Output:
man history
ls
ll
clear
cd ~
history
Thanks to everyone for your great solutions. Paul’s is the simplest and will work for me for because my bash history size is set at 2000.
I also wanted to share a cool article I found this morning. It has a couple good options that I am now using, like keeping duplicate entries out of the bash history and making sure multiple bash sessions don’t overwrite the history file: http://blog.macromates.com/2008/working-with-history-in-bash/
Try this: