Eu recomendo usar sponge
de moreutils . A partir do manpage:
DESCRIPTION
sponge reads standard input and writes it out to the specified file. Unlike
a shell redirect, sponge soaks up all its input before opening the output file.
This allows for constructing pipelines that read from and write to the same
file.
Para aplicar isso ao seu problema, tente:
uniq .bash_history | sponge .bash_history