* history on AFS
@ 1992-02-25 8:36 Julian L. Ho
0 siblings, 0 replies; only message in thread
From: Julian L. Ho @ 1992-02-25 8:36 UTC (permalink / raw)
To: rc
Sorry if this isn't the sort of thing you want in your mailbox. Here
is what I've been using to keep my history file updated in spite of
AFS...
-J
# AFS holds a complete history, always. This is atomic on a per machine,
# per login basis. Avoid logging out more than once, at the same time.
# history file for this shell and all its children
# put on the local hard drive (hopefully O_APPEND works there)
history = /tmp/. ^ $USER ^ _history_ ^ $pid
# build history file (or turn off all history processing)
if (cp $home/.history $history) {
oldhistsiz = `{ wc -l $history }
oldhistsiz = $oldhistsiz(1)
} else
history = ()
# clean up machine local history
# add to sigexit
fn history {
if (~ $history ())
return
if (~ $oldhistsiz ())
oldhistsiz = `{ wc -l $history }
L = `{ expr $oldhistsiz(1) + 1 } \
sed -n $L ^ ',$p' $history >>$home/.history &&
rm -f $history
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1992-02-25 8:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-02-25 8:36 history on AFS Julian L. Ho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).