Any Bash features you'd like to see?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed May 11 20:54:38 UTC 2005


On Wed, May 11, 2005 at 04:49:59PM -0400, William Park wrote:
> I guess you could use '.bash_history.pid' instead of just
> '.bash_history'.  Mind you, .bash_history is only written on exit.  So,
> what's wrong with using shell's internal history buffer?

Start two shells.

Do some work in shell 1, then exit (it writes its history to
.bash_history)

Do some work in shell 2, then exit (it writes its history to
.bash_history, completely overwriting anything you just did in shell 1.
You will just have whatever the history was before starting the shells,
plus whatever you did in shell 2).

Each shell's internal history is fine, but if you want to logout and be
able to go back to those commands later, you have to be sure the last
shell you exit is the one with the commands you want it to remember in
the future.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list