bug-coreutils
[Top][All Lists]
Advanced

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

Re: Feature request: handling space-delimited data with cut


From: Pádraig Brady
Subject: Re: Feature request: handling space-delimited data with cut
Date: Fri, 15 May 2009 13:52:37 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071008)

Eric Blake wrote:
> According to Andrew McGill on 5/15/2009 4:10 AM:
>>  * There is no SIMPLE tool for handling space delimited data ({'$awk'} is not
>>    simple, IMHO)
> 
> awk may not be as simple as some other tools, but it is standardized by
> POSIX and is the application of choice for portable scripts when dealing
> with space-delimited data.  That's just a fact of life that you will have
> to learn to live with.
> 
>>  1. Adding an option (-w) similar to -f to cut words separated by whitespace 
>>     (same rules as sort, unless the whitespace is changed to something else
>>     with -d)
> 
> The bar for adding new options is very high.  Supposing we added it, you
> have to remember that it still cannot be used by portable scripts, but
> only on installations where you know for sure that new enough coreutils is
> installed.  We tend to not want to bloat tool A if tool B can already do
> the job in a standardized manner.

I agree of course. It's hard to decide.

>> I'm in favour of cut -w ... can I send a patch?
> 
> Yes, anyone can send a patch.  But be prepared to provide a VERY strong
> case for its inclusion, or to get back the reply that we don't want to
> risk incorporating it in the official upstream repository (but of course
> you can continue using your patch on your personal installation).

90% of the time I use cut, I want it to split on whitespace.
How about supporting: cut -d '[:space:]'

cheers,
Pádraig.




reply via email to

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