home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3117 < prev    next >
Encoding:
Internet Message Format  |  1992-07-24  |  2.9 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!wupost!darwin.sura.net!haven.umd.edu!news.umbc.edu!gmuvax2!rjackson
  2. From: rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr)
  3. Newsgroups: comp.unix.shell
  4. Subject: csh/ksh comparison summary. Thanks!
  5. Message-ID: <1992Jul24.142605.16455@gmuvax2.gmu.edu>
  6. Date: 24 Jul 92 14:26:05 GMT
  7. Sender: rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr)
  8. Organization: George Mason University, Fairfax, Va.
  9. Lines: 68
  10.  
  11. Thank you for your responses on my 'csh/ksh comparison questions?  This
  12. group has been the most responsive of all other groups I have delt with.
  13. I am including a summary of responses to my three questions.  One point
  14. seemed to be clear; use a more advanced interactive shell (e.g., bash, zsh,
  15. tcsh).  The following are people kind enough to offer a response.  Please
  16. excuse me if I accidentally left your name out.
  17.  
  18. Tim Shelling    (tim@mal-s1.gatech.edu)
  19. Colum Mylod    (cmylod@nl.oracle.com)
  20. James Yorton    (yorton@turtle11.rtsg.mot.com)
  21. Dave Anderson    (dla@westford.ccur.com)
  22. Bob Halloran    (rkh@d1.att.com)
  23. Mike O'Connor    (mjo@fmsr17.srl.ford.com)
  24. David Wagner    (dawagner@phoenix.Princeton.edu)
  25.  
  26. A summary/collection of responsives follows:
  27.  
  28. In article <1992Jul21.183727.20364@gmuvax2.gmu.edu>, rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) writes:
  29. |> I did a simple comparison of CSH and KSH.  I am asking this
  30. |> group for solutions to csh feature that ksh appears to lack.
  31. |> I am using ULTRIX 4.1, VAX 8530.
  32. |> 
  33. |> 1) set filec or file completion
  34.  
  35. In ksh, using vi-style command line editing, try
  36.  
  37. <ESC>* or <ESC>\ 
  38.  
  39. where <ESC> is the ESCAPE key.
  40. There is a slight difference.  I'm not a tcsh user, but users tell
  41. me that <ESC>\ is quite similar to tcsh's file name completion.
  42.  
  43. In ksh, using emacs-style command line editing, try
  44.  
  45. <ESC><ESC>
  46.  
  47. |> 
  48. |> 2) concurrent sessions inadvertently use the same history
  49. |>    file.  Appending a pid to the history file at login may help
  50. |>    but there is no logout facility to remove the file.
  51. |> 
  52.  
  53. How about using a different history file for each tty?
  54. How about something like:
  55.  
  56. tty=`tty`
  57. export HISTFILE=~/.history_${tty#/dev/}
  58.  
  59. I suggest you clean up the history files periodically, or you
  60. may have a lot of them laying around.  It's like politics,
  61. some people want it one way, some the other.  Neither is wrong.
  62.  
  63. I use the same history file name (".sh_history"), but explicitly remove 
  64. it in my .profile just prior kicking off my .kshrc.  This unlinks any 
  65. visible versions of ".sh_history" -- however the "removed" versions are 
  66. still available to the previous invocation(s) of ksh (as temporary files). 
  67.  
  68. |> 3) how does one invoke a .logout script at ksh exit?
  69. |> 
  70.  
  71. How about putting this at the top of your .profile:
  72.  
  73. trap '[[ -x ~/.logout ]] && ~/.logout' 0 1 15
  74.  
  75. which will execute your .logout script (if it's executable)
  76. on the receipt of certain signals.  Do a chmod +x ~/.logout too.
  77. You can then put anything in .logout, including removal of
  78. your history files.
  79.