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

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!sample.eng.ohio-state.edu!purdue!haven.umd.edu!darwin.sura.net!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 summary. Thanks!
  5. Message-ID: <tim.712336405@mal-s1>
  6. Date: 28 Jul 92 15:13:25 GMT
  7. References: <1992Jul24.142605.16455@gmuvax2.gmu.edu>
  8. Sender: news@prism.gatech.EDU
  9. Organization: Georgia Tech Res. Inst./Modeling & Analysis Lab
  10. Lines: 50
  11.  
  12. In <1992Jul24.142605.16455@gmuvax2.gmu.edu> rjackson@gmuvax2.gmu.edu (Richard L Jackson Jr) writes:
  13.  
  14. >|> I did a simple comparison of CSH and KSH.  I am asking this
  15. >|> group for solutions to csh feature that ksh appears to lack.
  16. >|> I am using ULTRIX 4.1, VAX 8530.
  17. >|> 
  18. >|> 1) set filec or file completion
  19.  
  20. >In ksh, using vi-style command line editing, try
  21.  
  22. ><ESC>* or <ESC>\ 
  23.  
  24. >where <ESC> is the ESCAPE key.
  25. >There is a slight difference.  I'm not a tcsh user, but users tell
  26. >me that <ESC>\ is quite similar to tcsh's file name completion.
  27.  
  28. >In ksh, using emacs-style command line editing, try
  29.  
  30. ><ESC><ESC>
  31.  
  32. One more thing... In BASH, in either editing mode, you can start typing
  33. in the name of a file, then hit <TAB>, and if the shell can complete it
  34. with an existing file, it will print them and add a space. If not, it
  35. will list the files that match if * were appended to it.
  36.  
  37. So let's say you have these files in a directory:
  38. -rw-r--r--  1 tim          3180 Jul 28 10:46 3_ai.doc
  39. -rw-r--r--  1 tim          2565 Jul 28 10:47 3_ai_1.doc
  40. -rw-r--r--  1 tim         11451 Jul 28 10:48 3_ai_2.doc
  41. -rw-r--r--  1 tim          4675 Jul 28 10:49 3_ai_3.doc
  42.  
  43. If you type:
  44. more 3_<TAB>
  45.  
  46. the shell will list the matching files for you: 
  47. 3_ai.doc    3_ai_2.doc
  48. 3_ai_1.doc  3_ai_3.doc  
  49.  
  50. If you type in some more characters, you'll get:
  51. You > more 3_ai_1<TAB>
  52. BASH> more 3_ai_1.doc
  53.  
  54. If you type in the name of a directory instead of a file, 
  55. BASH will complete that directory name and add '/'.
  56.  
  57. -- 
  58.  --------------------------
  59. |Timothy J. Shelling, CmpE |"Paired opposites define your longings --
  60. |  tim@mal-s2.gatech.edu   |  and those longings imprison you."
  61. | gt2540b@prism.gatech.edu |                    -- Zensunni Whip
  62.