Closed brentp closed 12 years ago
You can haz the high fives!
:) I just realized it doesn't support open-ended ranges like cut would, e.g. cut -f 2-
Yeah, but it is a great improvement nonetheless. I have been using groupby for some very wide files recently and this will be a big help. Plus, you typically know how many columns are in a file so it is not too inconvenient to have to write 2-22 versus 2-. Much easier than 2,3,4,5,6,...,22!
Here's an initial go at it. You can specifiy -g 1-3 and -g 3-1, and in the latter case, the columns will be ordered in reverse as requested. Can also mix "," and "-", e.g. 1,2-4,6.