On 28 April 2012 22:38, Peter Gueckel <pgueckel(a)gmail.com> wrote:
I read about a shell variable called HISTIGNORE that is supposed to
prevent duplicate
commands from occurring in .bash_history.
I put the following line into ~/.bash_profile:
export HISTIGNORE="&"
It's not working. I still have duplicate commands galore. Why isn't is
working?
HISTIGNORE only deals with consecutive duplicates, IIRC.
What you want is:
export HISTCONTROL=erasedups
you might also want to add ":ignorespace" to the end of that. That will
cause any command prefixed by a space to be ignored as well - very useful
for those long commands that you will only ever run once!
Regards,
--
Andy
*The only person to have all his work done by Friday was Robinson Crusoe*