Jim Meyering wrote:
> Pádraig Brady wrote:
> 
> Hi Pádraig,
> 
>> 90% of the time I use cut, I want it to split on whitespace.
> 
> Same here (though usually SP+TAB are all I care about).
> That's why when I insist on using cut, I'd first filter the input
> through e.g., tr -s '[[:blank:]]' ' '
> 
> Other times I might use awk, perl, or even ruby.
> 
>> How about supporting: cut -d '[:space:]'
> 
> Why? ;-)

Sorry, I was playing devil's advocate but was too terse.
The advantage of cut -d '[:whatever:]' is that it would be trivial
to implement and would save a data copy between tr and cut.
Also if cutting a range of fields, one can maintain the original
separators which might be desired. Also since this is the common
case, it's slightly less syntax than tr .... | cut ....

The other side of the argument is that this is new functionality,
which is bad from a portability/documentation/learning standpoint.

I'm 55:45 against adding cut -d '[:blank:]'

cheers,
Pádraig.


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to