I am trying to reorder the columns using awk, sed... but I could not find the correct answer for that, Basically, I want to reorder the Values from:
time 012016 022016 032016 04216
John 231 321 121 432
Mary 456 213 654 735
Charles 325 867 984 235
to:
time John Mary Charles
012016 231 456 325
022016 321 213 867
032016 121 654 984
042016 432 735 235
I tried to use something like but I am missing the numbers:
awk '{print $1}' ./database.dat | paste -d, -s
output:
time John Mary Charles