From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id IAA28299 for ; Thu, 11 Apr 1996 08:24:16 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id SAA21055; Wed, 10 Apr 1996 18:18:27 -0400 (EDT) Resent-Date: Wed, 10 Apr 1996 18:18:27 -0400 (EDT) Date: Wed, 10 Apr 1996 23:16:57 +0100 From: Daniel Dignam Subject: Re: History file locking? Sender: daniel@UG.EDS.COM To: zsh-workers@math.gatech.edu Message-id: <316C3358.7ACA@UG.EDS.COM> Organization: EDS Unigraphics, Cambridge, England MIME-version: 1.0 X-Mailer: Mozilla 3.0b2 (X11; I; HP-UX A.09.05 9000/720) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit References: <199604102121.XAA08127@bolyai.cs.elte.hu> <960410144122.ZM17336@zyrcon.z-code.com> Resent-Message-ID: <"YvuhO.0.v85.pE3Rn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/916 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hmm, I've been using the following for years (I'm currently on 2.4.333 beta) precmd () { fc -nl -1 | concat $MY_HISTFILE } Were concat is a simple little program which gurantees you get a lock (via some remote server proc). Then the .zshrc does something along the lines of: tail -200 $MY_HISTFILE >/tmp/g$$ fc -R /tmp/g$$ /bin/rm /tmp/g$$ It amazing how useful a shell history stretching back for a year can be. As Bart said earlier, "if you can do it with an external process, it doesn't belong in the shell" Coping with locking over NFS is not a nice hole. -- Daniel Dignam, mailto:daniel@edsug.com Assemblies Development Phone: +44 1223-371591 EDS Unigraphics FAX: +44 1223-316931 http://www-sdl.ug.eds.com/ug_assemblies.html