https://github.com/sjaturner/cutex
I wrote a small Bash wrapper for cut.
I like cut and use it a lot. However, for lines with lots of fields I spend a while guessing and missing the field numbers which I actually want.
Typical workflow:
"Oh, that looks like field 12, doh! field 15, no ... 14 ..." and so on. Irritating and it sort of breaks the flow while building a pipeline.
The cut extension, cutex, allows you to place a solitary -f flag on the end of your command line. That will enumerate all the fields in a list running down the screen. Pick the fields and ranges you want, add those after the -f flag and carry on.
This also works for columns, with a -c at the end of the line - but I find I use that mode less.
Since the extension uses cut to generate the enumerated list, it should get that right. Also, the overhead should be small as it maps straight to cut when you supply the fields.
#unix #bash #scripting