Ready to be published? LXer is read by around 350,000 individuals each month, and is an excellent place for you to publish your ideas, thoughts, reviews, complaints, etc. Do you have something to say to the Linux community?
Swapping the rows and columns in a table on the command line would seem to be a fairly easy thing to do [...] Transposing rows and columns is indeed easy if you have the GNU datamash utility on your system [...] I wrote 'trans' as throwaway code for transposing my own tables. It could be extended so that argument 2 specifies the input column separator, and argument 3 a different column separator for the output. There are other ways to swap rows and columns in tables, for example using Perl, but for the time being I'm happy with the script!
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help