The contents of the table can be any real numbers.
This is best explained by way of an example. Suppose the file data contains the lines:
y 1 2 3 4 - - - - - 2 1 0 0 0 3 1 0 0 0 4 0 0 2 0 5 0 0 0 2 6 0 0 0 2where exactly one tab-character separates the columns.
The command invert < data yields
col x y --- - - 1 1 2 1 1 3 2 3 4 2 4 5 2 4 6on the standard output.
Invert uses awk to do its work. This makes for easy programming, but at a cost in efficiency. Usually, tables are small and this is not a problem.