I would like to sort from field $2 to field $6 for each of the line to:-
1 2 3 4 6 8
2 1 1 2 3 9
3 1 3 3 5 6
4 2 3 7 8 9
I came across this Arrays on example 26-6. But it is much complicated. I am looking any better way to perform the above. For your information the information which I printed out at the first stage (before sort) is using bash.
Thanks for the suggestion. But I am looking at solution for bash so I could pass the sorted array directly. I need to do some extra computation on the sorted array before printed out to a new file.