[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: .bash_history duplicates



On Wed, Nov 26, 2008 at 5:28 PM, Robert Holtzman <holtzm@cox.net> wrote:
> I've been going thru a number of bash related web sites looking for the way
> to eliminate duplicates in ~/.bash_history. So far I've turned up
>
> export HISTCONTROL=ignoredups
> export HISTCONTROL=erasedups
> awk '!x[$0]++' .bash_history > .bash.tmp && mv -f .bash.tmp .bash_history
> export HISTCONTROL=ignoreboth
>
> Tried them all in ~/.bashrc one at a time and rerunning .bashrc each time.
> So far no joy. Any pointers and/or sources appreciated.

Only

export HISTCONTROL=erasedups

Is working for me.


Reply to: