"Chris Dew" <[EMAIL PROTECTED]> writes:

> I was therefore thinking that cut could have a '-r, --count-from-right'
> switch, which would make all  field/column values 'right-relative'.

Thanks for the suggestion, but wouldn't it be better to allow people
to mix left-relative and right-relative fields in the same call to
'cut'?

How about preceding the Python/Ruby-like range with "@"?  Then we can
get everything Python/Ruby-like all at once, including zero origin
(which is clearer to me, at least).  We can also use : instead of - to
separate the values, to avoid ambiguity.  Thus,

cut -f @0 (instead of cut -f 1)
cut -f @1:3 (instead of cut -f 2-3)
cut -f @1:-1 (to get the sort of behavior you want)

Jim Meyering has the final say on this sort of thing of course, but I
think if we're going to do Python/Ruby-style ranges we should go all
the way.  (With "cut" and with other programs like "sort" too, but one
program at a time, I suppose.)


_______________________________________________
Bug-coreutils mailing list
Bug-coreutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to