svn commit: trunk/busybox
Rob Landley
rob at landley.net
Thu May 11 18:28:00 UTC 2006
On Thursday 11 May 2006 1:55 pm, Rich Felker wrote:
> On Thu, May 11, 2006 at 08:55:33AM -0400, Paul Fox wrote:
> > rich wrote:
> > > On Wed, May 10, 2006 at 10:08:42PM -0400, Mike Frysinger wrote:
> > > > On Wednesday 10 May 2006 14:52, Bernhard Fischer wrote:
> > > > > + find . -name .depend'*' -print0 | xargs -0 rm -f
> > > > >
> > > > > That's IMO not ideal..
> > > > > /busybox$ ./busybox find . -name .depend'*' -print0
> > > > > BusyBox v1.2.0-pre0 (2006.05.10-18:50+0000) multi-call binary
> > > > >
> > > > > Usage: find [PATH...] [EXPRESSION]
> > > >
> > > > *shrug* doesnt really matter to me
> > >
> > > Just remove the 0, it's nonsense. Filenames do not have embedded
> > > newlines in them! Anyone who creates such stupid filenames deserves
> > > what they get.
> >
> > in this case, at least, it protects against spaces in names as
> > well, which are a lot more common than newlines. that being
> > said, this isn't a windows or mac development tree. okay by me
> > to drop the 0.
>
> protects spaces? how? xargs reads one filename per line, not per word.
echo one two three | xargs ls
ls: one: No such file or directory
ls: two: No such file or directory
ls: three: No such file or directory
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list