home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / question / 10530 < prev    next >
Encoding:
Text File  |  1992-08-30  |  1.4 KB  |  51 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!gumby!wupost!cs.utexas.edu!milano!bohrer
  3. From: bohrer@mcc.com (Bill Bohrer)
  4. Subject: Re: A question on ls
  5. Message-ID: <1992Aug29.235425.26762@mcc.com>
  6. Organization: MCC, Austin, TX
  7. References: <6786@tekig7.PEN.TEK.COM> <1992Aug29.233534.27967@umbc3.umbc.edu>
  8. Distribution: na
  9. Date: Sat, 29 Aug 1992 23:54:25 GMT
  10. Lines: 39
  11.  
  12. In article <1992Aug29.233534.27967@umbc3.umbc.edu> rouben@math9.math.umbc.edu (Rouben Rostamian) writes:
  13. >In article <6786@tekig7.PEN.TEK.COM> naren@tekig5.pen.tek.com (Naren Bala) writes:
  14. >>If I type
  15. >>% ls *.Z 
  16. >>All files with .Z extension are displayed.
  17. >>
  18. >>What command would I type to display all files that do not have a .Z 
  19. >>extension ?
  20. >
  21. >The wildcards are expanded by the shell, so the answer is: it depends on
  22. >the shell you are using.  In tcsh, you type:
  23. >% ls ^*.Z
  24. >In sh and csh you are out of luck.  In other shells, I don't know.
  25.  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  26.  
  27. Not true, this should work in ALL shells:
  28.  
  29. ls | grep -v '.Z'
  30.  
  31.  
  32. Bill Bohrer
  33. bohrer@mcc.com
  34.  
  35. Microelectronics and Computer Technology Corporation
  36. (MCC ... the "T" didn't conform to the industry-wide
  37. three-initial-standard..)
  38. 3500 West Balcones Center Drive
  39. Austin,  TX  78759-6509
  40. (512)343-0978
  41.  
  42.  
  43.  
  44.  
  45.  
  46. -- 
  47. -- 
  48. SUB-STANDARD DISCLAIMER: I'm from NEW YORK fr chrissake!  It's an
  49.       Election YEar, gimme a break. If this post  had been meant 
  50.       as a *FLAME*, it would have started of with the customary, 
  51.