Article View: comp.unix.shell
Article #4021bash history: saving to and restoring from different file
From: S P Arif Sahari Wibowo
Date: Sat, 20 Sep 2008 05:44
Date: Sat, 20 Sep 2008 05:44
23 lines
1798 bytes
1798 bytes
Hi!
Is there a way for an interactive bash invocation to restore
history from file A, but later save / append to file B?
As for the motivation, it is to reduce duplicate in restored
history, therefore can fit more lines in the history without
increasing memory per bash invocation. Yes there is erasedups
HISTCONTROL option but it does not help removing duplicate
caused by multiple bash invocation. If the file to restore from
and file to save to can be different, I can create short script
to filter out the duplicate from the history file and save it in
different file. The bash invocation then restore history from
the filtered file but later still save / append added history to
the original history file.
Thanks!
--
(stephan paul) Arif Sahari Wibowo
_____ _____ _____ _____
/____ /____/ /____/ /____
_____/ / / / _____/ http://www.arifsaha.com/
Technical Details
Message-ID:
<alpine.OSX.1.10.0809191320370.13605@imac2006.local>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!news.k-dsl.de!aioe.org!arifsahaShow Full Headers
Complete Article Headers
X-Google-Thread: 1012a6,6f426515059a57b0,start X-Google-Thread: 1054c0,6f426515059a57b0,start X-Google-Attributes: gid1012a6,gid1054c0,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.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: bash history: saving to and restoring from different file Date: Sat, 20 Sep 2008 01:44:59 -0400 Organization: Aioe.org NNTP Server Lines: 23 Message-ID: <alpine.OSX.1.10.0809191320370.13605@imac2006.local> NNTP-Posting-Host: vD1fPeV+h0XQwHjppeoN+w.user.aioe.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Complaints-To: abuse@aioe.org X-Archive: encrypt User-Agent: Alpine 1.10 (OSX 962 2008-03-14)