Article View: comp.unix.shell
Article #135csh/ksh comparison summary. Thanks!
From: Richard L Jackson Jr
Date: Fri, 24 Jul 1992 14:26
Date: Fri, 24 Jul 1992 14:26
68 lines
3064 bytes
3064 bytes
Thank you for your responses on my 'csh/ksh comparison questions? This
group has been the most responsive of all other groups I have delt with.
I am including a summary of responses to my three questions. One point
seemed to be clear; use a more advanced interactive shell (e.g., bash, zsh,
tcsh). The following are people kind enough to offer a response. Please
excuse me if I accidentally left your name out.
Tim Shelling (tim@mal-s1.gatech.edu)
Colum Mylod (cmylod@nl.oracle.com)
James Yorton (yorton@turtle11.rtsg.mot.com)
Dave Anderson (dla@westford.ccur.com)
Bob Halloran (rkh@d1.att.com)
Mike O'Connor (mjo@fmsr17.srl.ford.com)
David Wagner (dawagner@phoenix.Princeton.edu)
A summary/collection of responsives follows:
In article <1992Jul21.183727.20364@gmuvax2.gmu.edu>, rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) writes:
|> I did a simple comparison of CSH and KSH. I am asking this
|> group for solutions to csh feature that ksh appears to lack.
|> I am using ULTRIX 4.1, VAX 8530.
|>
|> 1) set filec or file completion
In ksh, using vi-style command line editing, try
<ESC>* or <ESC>\
where <ESC> is the ESCAPE key.
There is a slight difference. I'm not a tcsh user, but users tell
me that <ESC>\ is quite similar to tcsh's file name completion.
In ksh, using emacs-style command line editing, try
<ESC><ESC>
|>
|> 2) concurrent sessions inadvertently use the same history
|> file. Appending a pid to the history file at login may help
|> but there is no logout facility to remove the file.
|>
How about using a different history file for each tty?
How about something like:
tty=`tty`
export HISTFILE=~/.history_${tty#/dev/}
I suggest you clean up the history files periodically, or you
may have a lot of them laying around. It's like politics,
some people want it one way, some the other. Neither is wrong.
I use the same history file name (".sh_history"), but explicitly remove
it in my .profile just prior kicking off my .kshrc. This unlinks any
visible versions of ".sh_history" -- however the "removed" versions are
still available to the previous invocation(s) of ksh (as temporary files).
|> 3) how does one invoke a .logout script at ksh exit?
|>
How about putting this at the top of your .profile:
trap '[[ -x ~/.logout ]] && ~/.logout' 0 1 15
which will execute your .logout script (if it's executable)
on the receipt of certain signals. Do a chmod +x ~/.logout too.
You can then put anything in .logout, including removal of
your history files.
Technical Details
Message-ID:
<1992Jul24.142605.16455@gmuvax2.gmu.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!wupost!darwin.sura.net!haven.umd.edu!news.umbc.edu!gmuvax2!rjacksonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!wupost!darwin.sura.net!haven.umd.edu!news.umbc.edu!gmuvax2!rjackson From: rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) Newsgroups: comp.unix.shell Subject: csh/ksh comparison summary. Thanks! Message-ID: <1992Jul24.142605.16455@gmuvax2.gmu.edu> Date: 24 Jul 92 14:26:05 GMT Sender: rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) Organization: George Mason University, Fairfax, Va. Lines: 68