Laurent Lyaudet wrote:
> it would be useful that cut handles negative numbers parameters for
> columns and fields as "from the end" parameters.
> ...
> I think using awk or something similar is overkill for solving that problem.

Why?  I think awk is the perfect tool for it.  It already handles the
problem well.  It is standard.

Awk:
  $ echo one two three | awk '{print$NF}'
  three

  $ echo one two three | awk '{print$(NF-1)}'
  two

Perl:
  $ echo one two three | perl -lane 'print $F[-1]'
  three

If cut included all of the features of awk (or perl) then cut would
also be overkill for the problem too, right?  Except then there
wouldn't be a way to avoid the bloat by using the small and light
weight cut, because cut wouldn't be small and light weight anymore,
right?

Meanwhile, I am not strongly opposed to this particular feature.  I am
strongly opposed to creeping featurism.

Bob

Reply via email to