home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3085 < prev    next >
Encoding:
Text File  |  1992-07-22  |  2.4 KB  |  71 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!ftpbox!motsrd!white!sapphire.rtsg.mot.com!motcid!yorton
  3. From: yorton@turtle11.rtsg.mot.com (James J. Yorton)
  4. Subject: Re: csh/ksh comparison questions?
  5. Message-ID: <1992Jul22.141857.22856@rtsg.mot.com>
  6. Sender: news@rtsg.mot.com
  7. Nntp-Posting-Host: turtle11
  8. Reply-To: yorton@rtsg.mot.com
  9. Organization: Motorola Inc., Cellular Infrastructure Group
  10. References:  <1992Jul21.183727.20364@gmuvax2.gmu.edu>
  11. Date: Wed, 22 Jul 1992 14:18:57 GMT
  12. Lines: 57
  13.  
  14. In article <1992Jul21.183727.20364@gmuvax2.gmu.edu>, rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) writes:
  15. |> I did a simple comparison of CSH and KSH.  I am asking this
  16. |> group for solutions to csh feature that ksh appears to lack.
  17. |> I am using ULTRIX 4.1, VAX 8530.
  18. |> 
  19. |> 1) set filec or file completion
  20.  
  21. In ksh, using vi-style command line editing, try
  22.  
  23. <ESC>* or <ESC>\ 
  24.  
  25. where <ESC> is the ESCAPE key.
  26. There is a slight difference.  I'm not a tcsh user, but users tell
  27. me that <ESC>\ is quite similar to tcsh's file name completion.
  28.  
  29. In ksh, using emacs-style command line editing, try
  30.  
  31. <ESC><ESC>
  32.  
  33. |> 
  34. |> 2) concurrent sessions inadvertently use the same history
  35. |>    file.  Appending a pid to the history file at login may help
  36. |>    but there is no logout facility to remove the file.
  37. |> 
  38.  
  39. How about using a different history file for each tty?
  40. How about something like:
  41.  
  42. tty=`tty`
  43. export HISTFILE=~/.history_${tty#/dev/}
  44.  
  45. I suggest you clean up the history files periodically, or you
  46. may have a lot of them laying around.  It's like politics,
  47. some people want it one way, some the other.  Neither is wrong.
  48.  
  49. |> 3) how does one invoke a .logout script at ksh exit?
  50. |> 
  51.  
  52. How about putting this at the top of your .profile:
  53.  
  54. trap '[[ -x ~/.logout ]] && ~/.logout' 0 1 15
  55.  
  56. which will execute your .logout script (if it's executable)
  57. on the receipt of certain signals.  Do a chmod +x ~/.logout too.
  58. You can then put anything in .logout, including removal of
  59. your history files.
  60.  
  61. |> Richard Jackson
  62.  
  63. --------------------------------------+---------------------------------------
  64. James J. Yorton                       | Telephone:  +1 708-632-6695
  65. Motorola Inc., General Systems Sector |
  66. Cellular Infrastructure Group         | internet:  yorton@rtsg.mot.com
  67. 1501 - West Shure Drive               | uucp:      ...!uunet!motcid!yorton
  68. Mail Drop:  IL27-3227                 |
  69. Arlington Heights, IL  60004          |
  70. USA                                   |
  71.