RE: Splitting search results from a "find -print0"
From:
Cook, Malcolm
Subject:
RE: Splitting search results from a "find -print0"
Date:
Fri, 9 Jan 2015 20:19:15 +0000
+1
I think this is well considered.
Resurrecting -z for symmetry and perspicuity, and then documenting that "-z" is
equivalent to "-t $'\0'" and thus conflicts with the presence of another -t
(since multiple -t is disallowed)
$.02,
Malcolm (usually lurking)
>-----Original Message-----
>From: coreutils-bounces+mec=address@hidden
>[mailto:coreutils-bounces+mec=address@hidden] On Behalf Of PƔdraig
>Brady
>Sent: Thursday, January 08, 2015 10:24 PM
>To: Assaf Gordon
>Cc: Markus Elfring; address@hidden
>Subject: Re: Splitting search results from a "find -print0"
>
>On 09/01/15 04:13, Assaf Gordon wrote:
>> On Jan 8, 2015, at 21:16, PƔdraig Brady <address@hidden> wrote:
>>> I made a few adjustments, as seen inline below.
>>
>> Thank you for the clean-up and fixes. Looks much better now.
>>
>>> The main change was the removal of the -z option as that's supported with
>>> -t '\0'.
>>
>> I humbly do think that the '-z' is nice, add some symmetry with the other
>> utilities which support '-z' for NUL line-termination. I
>understand "split" is not strictly a line-based utility (more like
>'record-based'), but in the use-cases when the separator is relevant, it is
>commonly used for lines.
>> So if one combines it with other gnu programs (e.g.
>> find/xargs/sed/grep/sort/join/uniq) - it is '-z' almost for all of them.
>> But this is
>nit-picking, of course, and does add some bloat/redundancy.
>
>maybe
>
>> If not '-z', perhaps it's worth adding an explicit mention of the "-t '\0'"
>> method ?
>> at least for other programs, the man-page clearly mentions the words 'NUL'
>> and 'zero' - giving inexperienced user a hint about what
>to do.
>
>definitely. How about:
>
> -t, --separator=SEP
> use SEP instead of newline as record separator.
> use -t '\0' to specify the NUL (zero) character.
>
>thanks,
>PƔdraig.