From: John on
Hi,

Bash's history command is behaving oddly.

If I do "history -w" then it writes the current history to
~/.bash_history as expected.

But if I do "history -a" then ~/.bash_history doesn't get changed, and
from the modification time it hasn't been touched at all.

Any ideas for what might be causing this? Any obvious shell options or
suchlike that I should check?

Cheers,
John

From: John on
On 3 Oct 2009 at 20:19, Wanna-Be Sys Admin wrote:
> John wrote:
>> If I do "history -w" then it writes the current history to
>> ~/.bash_history as expected.
>>
>> But if I do "history -a" then ~/.bash_history doesn't get changed, and
>> from the modification time it hasn't been touched at all.
>
> Where they "new" history lines, or did you run that right after -w?

Yes, there was history to write!

Actually what happened was that I noticed "history -a" wasn't working,
then tried "history -w" and was surprised to find that it *did* work.