I'm struggling with a problem at the minute. Basically, I have a file with >1000 columns / fields (with headers), each containing a variable number of values. I would like to stack each column such that all the data appears in a single column, e.g. the first value of column 2 is moved to below the last value of column 1, and then followed by all other values in the column; the first value of column 3 is moved to below this new last value in column 1, and then followed by all other values in the column etc.
As I said, there are over 1000 columns, and the max number of values in any one is around 3500. I have played around with various cut / print / awk commands but not found anything that does what I want. Having said that, I just started working in Unix yesterday, so no idea if these actually can help. Any help would be greatly appreciated!