home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.linux
- Path: sparky!uunet!decwrl!csus.edu!borland.com!davison
- From: davison@borland.com (Wayne Davison)
- Subject: Re: DDEBs (DON'Ts, DON'T EVERs, & BEWARES)
- Message-ID: <BtADwF.1zE@borland.com>
- Organization: Borland International
- References: <1992Aug11.091207.29484@colorado.edu> <Bstv3p.2KD@news.cso.uiuc.edu> <1992Aug12.012136.21563@tc.cornell.edu>
- Date: Thu, 20 Aug 1992 14:36:14 GMT
- Lines: 33
-
- hargrove@theory.TC.Cornell.EDU (Paul H. Hargrove) wrote:
- > In article <Bstv3p.2KD@news.cso.uiuc.edu> thoth@uiuc.edu (Ben Cox) writes:
- > >When I want to remove files matching a wildcard, I always echo it first:
- > >
- > >$ echo silly?file*
- > >sillyXfile1a sillyYfile1b sillyZfile327a sillyqfileTHX1138
- > >$ rm silly?file*
- >
- > You're even better off (assuming bash) doing
- > $ echo silly?file*
- > sillyXfile1a sillyYfile1b sillyZfile327a sillyqfileTHX1138
- > $ rm !$ (or !* for multiple wildcards)
-
- If you're using zsh, it can expand wildcards into the command-line.
- This way if you type:
-
- $ rm silly?file*
-
- and hit tab, you'd see:
-
- $ rm sillyXfile1a sillyYfile1b sillyZfile327a sillyqfileTHX1138
-
- and you can simply hit return. You can also "setopt magicspace" to have
- it transform history references as you press space:
-
- $ rm !!:3
-
- would automatically replace the !!:3 with the 3rd argument of the prior
- command as you hit space. If you haven't tried zsh I recommend you give
- it a whirl.
- --
- Wayne Davison
- davison@borland.com
-