Dear experts i have a small problem where i just want to reverse the columns.For example i have a data sets arranged in 4 columns i need to put last column first, and so on reversely…how can this work be done…i hope some expert will definitely answer my questions.Thanks
in put data example
1 2 3 4 5 6 7 8 9 0 3 4 5 2 1 5 6 7 2 3
i need output like as below
5 4 3 2 1 0 9 8 7 6 1 2 5 4 3 3 2 7 6 5
Advertisement
Answer
Perl to the rescue!
perl -lane 'print join " ", reverse @F' < input-file