rewriting config_*, xmalloc_fget*
Rich Felker
dalias at aerifal.cx
Thu Jun 16 17:32:39 UTC 2011
On Thu, Jun 16, 2011 at 10:26:53AM -0700, Cathey, Jim wrote:
> There are exactly two characters (of an unsigned char)
> that cannot be in a Unix filename: '/', which is the
> path component separator, and '\0'. Everything else,
> including newlines and spaces, is perfectly legal
> in a filename, though perhaps incredibly annoying
> to deal with if present. The \0 delimiter was really
> the only choice for -print0. Don't really see a context
> where _both_ delimiters are meaningful in the same file
> stream, though.
Actually, xargs (the standard one, without -0) accepts a shell-quoted
list of filenames, so rather than -print0, find could have just been
enhanced with an option to shell-quote its output. This would have
been vastly more useful since the output would still be valid text,
and could be processed easily in shell scripts, as in:
eval "set -- `find -print-quoted ...`"
for i ; do
...
done
Rich
More information about the busybox
mailing list