Hi

I have a suggestion to allow the "cut" command to understand column
(field) numbers relative to the last column.  I find I need this
functionality very often when working with tabular data.  Currently,
the expression to achieve this is clumsy:

cut -f 3,5-$(echo $(head -1 myfile | wc -w) - 3 | bc) myfile

The new syntax could use +1 to specify the last column, +2 to specify
the second-last, etc.  This syntax is the same as for the "tail"
command.  Then you can achieve the same as the above expression by
writing:

cut -f 3,5-+3 myfile


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

Reply via email to