Article View: comp.unix.shell
Article #103Re: csh/ksh comparison questions?
From: James J. Yorton
Date: Wed, 22 Jul 1992 14:18
Date: Wed, 22 Jul 1992 14:18
57 lines
2525 bytes
2525 bytes
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.
|> 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.
|> Richard Jackson
--------------------------------------+---------------------------------------
James J. Yorton | Telephone: +1 708-632-6695
Motorola Inc., General Systems Sector |
Cellular Infrastructure Group | internet: yorton@rtsg.mot.com
1501 - West Shure Drive | uucp: ...!uunet!motcid!yorton
Mail Drop: IL27-3227 |
Arlington Heights, IL 60004 |
USA |
Technical Details
Message-ID:
<1992Jul22.141857.22856@rtsg.mot.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!ftpbox!motsrd!white!sapphire.rtsg.mot.com!motcid!yortonReferences:
<1992Jul21.183727.20364@gmuvax2.gmu.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell Path: arc1-ca.pugleaf.net!sparky!uunet!ftpbox!motsrd!white!sapphire.rtsg.mot.com!motcid!yorton From: yorton@turtle11.rtsg.mot.com (James J. Yorton) Subject: Re: csh/ksh comparison questions? Message-ID: <1992Jul22.141857.22856@rtsg.mot.com> Sender: news@rtsg.mot.com Nntp-Posting-Host: turtle11 Reply-To: yorton@rtsg.mot.com Organization: Motorola Inc., Cellular Infrastructure Group References: <1992Jul21.183727.20364@gmuvax2.gmu.edu> Date: Wed, 22 Jul 1992 14:18:57 GMT Lines: 57