bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: say that cut can't handle more than one field demarcator


From: Jim Meyering
Subject: Re: say that cut can't handle more than one field demarcator
Date: Mon, 08 Mar 2010 11:47:29 +0100

Pádraig Brady wrote:
> On 05/03/10 01:31, Pádraig Brady wrote:
>> On 04/03/10 20:05, address@hidden wrote:
>>> On (info "(coreutils) cut invocation") please add:
>>> cut has no way to specify a group of blanks as a field demarcator.
>>> If you want that, use perl -a. Also use perl's split if you want
>>> regexp demarcators, etc.
>>> If that is indeed the case.
>>
>> Actually using tr from coreutils you can do:
>>
>> tr -s '[:blank:]' '\t' | cut -f5
>>
>> In fact I thought I had already added that to
>> the info docs. I had intended adding it at least,
>> but obviously I misremembered checking it in.
>> I'll do that very soon.
>
> I'll push this to coreutils.texi (cut invocation) soon:
>
> `-f FIELD-LIST'
> `--fields=FIELD-LIST'
>      ..............................................  Note `cut' does
>      not support specifying runs of whitespace as a delimiter, so to
>      achieve that common functionality one can pre-process with `tr'
>      like:
>           tr -s '[:blank:]' '\t' | cut -f...

Thanks!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]