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

  1. Path: sparky!uunet!gatech!prism!mal-s1!tim
  2. From: tim@mal-s1.gatech.edu (Tim Shelling)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: csh/ksh comparison questions?
  5. Message-ID: <tim.711812407@mal-s1>
  6. Date: 22 Jul 92 13:40:07 GMT
  7. References: <1992Jul21.183727.20364@gmuvax2.gmu.edu>
  8. Sender: news@prism.gatech.EDU
  9. Organization: Georgia Tech Res. Inst./Modeling & Analysis Lab
  10. Lines: 41
  11.  
  12. Firstly, expert users of BASH (GNU's Bourne Again SHell) will
  13. be able to give you solutions to all these problems.
  14. Meanwhile, if you must with ksh....
  15.  
  16. In <1992Jul21.183727.20364@gmuvax2.gmu.edu> rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) writes:
  17.  
  18. >I did a simple comparison of CSH and KSH.  I am asking this
  19. >group for solutions to csh feature that ksh appears to lack.
  20. >I am using ULTRIX 4.1, VAX 8530.
  21.  
  22. >1) set filec or file completion
  23. On the command line, go into the vi-editing mode (I don't know how to do
  24. this in emacs mode), and place the cursor on the name of the file you want to 
  25. expand. Hit '*' which will expand the current filename as if '*' were 
  26. appended to it. Or hit '\' and the current word will be replaced with 
  27. "the longest common prefix of all filenames matching the current word with
  28. an asterik appended." There's a bunch of other nifty things... These features
  29. are present in BASH also.
  30.  
  31.  
  32. >2) concurrent sessions inadvertently use the same history
  33. >   file.  Appending a pid to the history file at login may help
  34. >   but there is no logout facility to remove the file.
  35.  
  36. With KSH you can trap signals and execute programs on reception of
  37. those signals. I've seen someone trap the EXIT  
  38. signal (or something like that) and have it run a shell, which
  39. did exactly that -- it removed a process-dependent sh-history file.
  40. Sometimes the shell was terminated abnormally and hisotry files
  41. would build up. So it's good to put them into a directory and
  42. once a week clean them out.
  43.  
  44. >3) how does one invoke a .logout script at ksh exit?
  45. See above.
  46.  
  47.  
  48. -- 
  49.  --------------------------
  50. |Timothy J. Shelling, CmpE |"Paired opposites define your longings --
  51. |  tim@mal-s2.gatech.edu   |  and those longings imprison you."
  52. | gt2540b@prism.gatech.edu |                    -- Zensunni Whip
  53.