[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Splitting search results from a "find -print0"
From: |
Pádraig Brady |
Subject: |
Re: Splitting search results from a "find -print0" |
Date: |
Thu, 08 Jan 2015 03:07:14 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 |
On 08/01/15 02:30, Pádraig Brady wrote:
> On 08/01/15 00:24, Assaf Gordon wrote:
>> Hello,
>>
>> On 01/07/2015 03:09 PM, Eric Blake wrote:
>>> On 01/07/2015 11:49 AM, Markus Elfring wrote:
>>>> Do I read the current documentation correctly in
>>>> the way that zero-terminated lines are not supported
>>>> so far?
>>>> http://www.gnu.org/software/coreutils/manual/html_node/split-invocation.html
>>>
>>> Correct. Patches welcome. In the meantime:
>>
>> attached is a quick attempt at splitting with custom line-separator '-t=SEP'
>> and NUL '-z' .
>>
>> It's not complete, but could be improved if this is the right direction.
>
> Yes this is probably worth adding.
> Note join(1) had both -t and -z as they were setting separate delimeters.
> split(1) would only need one of those.
> No other tools allow arbitrary delimiter chars, so I'd
> go with just the -z, --zero-terminated option.
Actually thinking a bit more, the other commands using --zero
are line oriented, whereas split is not, and so could
use other chars in more cases
Consider using ^L to mark split points in text for example.
Though then you might want to support --suppress-matched
like csplit does.
Ah I just now see a TODO comment at the top of split.c
that suggests -t CHAR or -t REGEX.
Now BSD already has -p REGEX so we'd use that syntax for compat,
though let's not worry about that now of course.
Let's just go with -t CHAR for now.
thanks,
Pádraig.
- Splitting search results from a "find -print0", Markus Elfring, 2015/01/07
- Re: Splitting search results from a "find -print0", Pádraig Brady, 2015/01/08
- Re: Splitting search results from a "find -print0", Assaf Gordon, 2015/01/08
- Re: Splitting search results from a "find -print0", Pádraig Brady, 2015/01/08
- RE: Splitting search results from a "find -print0", Cook, Malcolm, 2015/01/09