This one time, at band camp, Voytek Eymont wrote:
>when I try to look up 'what was that command I used last time' I get heaps
>of duplicates, I was planning on sorting then deduping the .history file
>
>can I just dedupe .bash_history with uniq, will I break anything if if I do?
>or, is there some way not to have multiple same entries in history stack ?

If you want them alphabetically sorted into another file, you can do
something like

sort .history | uniq > newfile

to remove duplicate lines.

You can edit the history file directly, too, shells write to that file when
they exit so you won't see any of your current shells history in it.  That
also makes it hard to remove duplicate commands from the shell.

-- 
[EMAIL PROTECTED]                           http://spacepants.org/jaq.gpg
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to