On Sun, Jun 28, 2009 at 2:20 AM, Craig Sanders<c...@taz.net.au> wrote:
> please add a -0 option to tr, which is equivalent to
> running:
>
>    tr '\n' '\000'
>
> this is a useful command for converting \n-terminated input lines to
> null-terminated strings suitable for feeding into 'xargs -0' as many
> programs can not generate null-terminated ouput by themselves.

This doesn't really buy you anything anyway.   The reasons are
discussed in the documentation for xargs and find.   See for example

info -f find -n "Deleting Files"
info -f find -n "Security Considerations for find"
info -f find -n "Security Considerations for xargs"

The essential point though has already been made by Bob and Andreas;
this causes failures for filenames which themselves contain newlines
(all Unix-like filesystems I am familiar with allow this).   Where no
file names contain newlines, the measure is not necessary anyway.

James.


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to