Article View: comp.unix.shell
Article #4025Re: bash history: saving to and restoring from different file
From: S P Arif Sahari Wibowo
Date: Sun, 21 Sep 2008 12:39
Date: Sun, 21 Sep 2008 12:39
24 lines
1692 bytes
1692 bytes
On Sun, 21 Sep 2008, Chris F.A. Johnson wrote:
> In your ~/.bashrc:
>
> history -c -r "$hfile1"
Thanks. I did try this before, and the history successfully
restored just after the command. However, once the .bashrc (and
.bash_profile) ended, bash still restore from the history file
adding to the history already there, doubling everything and
potentially removing the history loaded before (when it passes
HISTSIZE limit).
> history "$hfile2"
This gives error: numeric argument required
Any other idea? Thanks!
--
(stephan paul) Arif Sahari Wibowo
_____ _____ _____ _____
/____ /____/ /____/ /____
_____/ / / / _____/ http://www.arifsaha.com/
Technical Details
Message-ID:
<alpine.OSX.1.10.0809210816510.13605@imac2006.local>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.k-dsl.de!aioe.org!arifsahaReferences:
<alpine.OSX.1.10.0809191320370.13605@imac2006.local> <c9cc6$48d58e97$cef88ba3$32079@TEKSAVVY.COM>Show Full Headers
Complete Article Headers
X-Google-Thread: 1012a6,6f426515059a57b0 X-Google-Thread: 1054c0,6f426515059a57b0 X-Google-Attributes: gid1012a6,gid1054c0,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.k-dsl.de!aioe.org!arifsaha From: S P Arif Sahari Wibowo <arifsaha@yahoo.com> Newsgroups: comp.unix.shell,gnu.bash Subject: Re: bash history: saving to and restoring from different file Date: Sun, 21 Sep 2008 08:39:59 -0400 Organization: Aioe.org NNTP Server Lines: 24 Message-ID: <alpine.OSX.1.10.0809210816510.13605@imac2006.local> References: <alpine.OSX.1.10.0809191320370.13605@imac2006.local> <c9cc6$48d58e97$cef88ba3$32079@TEKSAVVY.COM> NNTP-Posting-Host: vD1fPeV+h0XQwHjppeoN+w.user.aioe.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Complaints-To: abuse@aioe.org X-Archive: encrypt User-Agent: Alpine 1.10 (OSX 962 2008-03-14)