[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: -0 option for tr
From: |
James Youngman |
Subject: |
Re: feature request: -0 option for tr |
Date: |
Wed, 1 Jul 2009 10:13:15 +0100 |
On Sun, Jun 28, 2009 at 2:20 AM, Craig Sanders<address@hidden> 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.
- Re: feature request: -0 option for tr,
James Youngman <=