I would like a command line incantation to reverse the field order of arbritrary length text records. Solutions provided in Rearrange columns using cut and Elegant way to reverse column order don't solve this issue since they assume a fixed amount of fields, though maybe they would with minor changes.
Sort of like the tac
command that exhibits reverse cat
functionality. I'd like what the ohce
command would do (if it existed) to reverse echo
functinality.
For example:
a b c d
e f
g h i
Should be transformed to
d c b a
f e
i h g