home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / linux / 9283 < prev    next >
Encoding:
Text File  |  1992-08-29  |  1.4 KB  |  44 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!decwrl!csus.edu!borland.com!davison
  3. From: davison@borland.com (Wayne Davison)
  4. Subject: Re: DDEBs (DON'Ts, DON'T EVERs, & BEWARES)
  5. Message-ID: <BtADwF.1zE@borland.com>
  6. Organization: Borland International
  7. References: <1992Aug11.091207.29484@colorado.edu> <Bstv3p.2KD@news.cso.uiuc.edu> <1992Aug12.012136.21563@tc.cornell.edu>
  8. Date: Thu, 20 Aug 1992 14:36:14 GMT
  9. Lines: 33
  10.  
  11. hargrove@theory.TC.Cornell.EDU (Paul H. Hargrove) wrote:
  12. > In article <Bstv3p.2KD@news.cso.uiuc.edu> thoth@uiuc.edu (Ben Cox) writes:
  13. > >When I want to remove files matching a wildcard, I always echo it first:
  14. > >
  15. > >$ echo silly?file*
  16. > >sillyXfile1a    sillyYfile1b    sillyZfile327a  sillyqfileTHX1138
  17. > >$ rm silly?file*
  18. > You're even better off (assuming bash) doing
  19. > $ echo silly?file*
  20. > sillyXfile1a    sillyYfile1b    sillyZfile327a  sillyqfileTHX1138
  21. > $ rm !$  (or !* for multiple wildcards)
  22.  
  23. If you're using zsh, it can expand wildcards into the command-line.
  24. This way if you type:
  25.  
  26. $ rm silly?file*
  27.  
  28. and hit tab, you'd see:
  29.  
  30. $ rm sillyXfile1a sillyYfile1b sillyZfile327a sillyqfileTHX1138
  31.  
  32. and you can simply hit return.  You can also "setopt magicspace" to have
  33. it transform history references as you press space:
  34.  
  35. $ rm !!:3
  36.  
  37. would automatically replace the !!:3 with the 3rd argument of the prior
  38. command as you hit space.  If you haven't tried zsh I recommend you give
  39. it a whirl.
  40. -- 
  41. Wayne Davison
  42. davison@borland.com
  43.