Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!batcomputer!itsgw!steinmetz!davidsen From: davidsen@steinmetz.ge.com (William E. Davidsen Jr) Newsgroups: comp.unix.questions Subject: Re: history file sharing in ksh Message-ID: <13137@steinmetz.ge.com> Date: 14 Feb 89 16:24:06 GMT References: <2401@crete.cs.glasgow.ac.uk> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: General Electric CRD, Schenectady, NY Lines: 20 In article <2401@crete.cs.glasgow.ac.uk> jack@cs.glasgow.ac.uk (Jack Campin) writes: | Does anyone know what protocol ksh uses for sharing the history file when | running multiple sessions? I cannot make sense of what I see happening. Does | it act differently for shells run from distinct NFS clients than when all | shells are on the same machine? Is there any concurrency control at all? If you want to have separate history files for each session (I usually run 3-5 connections on Xenix virtual terminals) you can do so by setting the name of the HISTFILE variable. You can use something as simple as the PID, or something a bit more informative, such as HISTFILE="/tmp/hist.$(basename $(tty))" The advantage of this (at least with virtual terminals) is that you keep the same history file for each terminal. Please note that you have to set HISTFILE *before* setting the editing option, like "set -o emacs" or vi. -- bill davidsen (wedu@ge-crd.arpa) {uunet | philabs}!steinmetz!crdos1!davidsen "Stupidity, like virtue, is its own reward" -me