<div class="gmail_quote">On 28 April 2012 22:38, Peter Gueckel <span dir="ltr">&lt;<a href="mailto:pgueckel@gmail.com" target="_blank">pgueckel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I read about a shell variable called HISTIGNORE that is supposed to prevent duplicate<br>
commands from occurring in .bash_history.<br>
<br>
I put the following line into ~/.bash_profile:<br>
<br>
export HISTIGNORE=&quot;&amp;&quot;<br>
<br>
It&#39;s not working. I still have duplicate commands galore. Why isn&#39;t is working?<br></blockquote><div><br clear="all"></div></div>HISTIGNORE only deals with consecutive duplicates, IIRC.<br><br>What you want is:<br>
<br>   export HISTCONTROL=erasedups<br><br>you might also want to add &quot;:ignorespace&quot; 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!<br>
<br>Regards,<br><br>-- <br>Andy<br><br><i>The only person to have all his work done by Friday was Robinson Crusoe</i><br>