Darren New <dne### [at] sanrrcom> wrote:
> Nicolas Alvarez wrote:
> >> Here's a contest. Given the directory /tmp/stuff, delete all the files
> >> in that directory that end with ".tmp".
> >>
> >> Let's see how many iterations it takes to get actually right.
> >
> > Then I guess rm /tmp/stuff/*.tmp isn't good enough? :)
> That doesn't even work if there *aren't* funky characters in the file name.
It *does* work, assuming you have a sufficiently modern shell (and not
a 20 years old sh). Modern shells are rather smart at escaping what needs
to be escaped when you write "*".
--
- Warp
Post a reply to this message
|