svn commit: trunk/busybox
Rob Landley
rob at landley.net
Thu May 11 19:30:50 UTC 2006
On Thursday 11 May 2006 2:50 pm, Rich Felker wrote:
> On Thu, May 11, 2006 at 02:40:04PM -0400, Paul Fox wrote:
> > > > > 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.
> >
> > no. what it reads is whitespace-separated.
>
> oh. how incredibly stupid. then just write a script to do what xargs
> should do, or better yet, use the -exec option to find...
Or do it the way you were initially objecting to, which separates entries with
nul bytes rather than whitespace.
Files are are allowed to have any character except NUL and the directory
separator in them. Paths can have any character but NUL. Therefore, the
logical character to use as a separator when you want reliable behavior, no
matter what kind of strange foreign language filesystem you're being used in
even when dealing with absolute paths with unknown upstream components is...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list