Hey,
I have a file that contains anywhere from 2 to 6 columns of data, which I need to sort based on one of these columns. Te catch is that I need all of the lines to stay together through the sorting, ei, the 6th entry in all columns has to stay together even though I am sorting based only one one column.
For example:
1 4 8
4 2 9
2 3 7
8 8 1
If sorted in ascending order by second column would have to look like:
4 2 9
2 3 7
1 4 8
8 8 1
Now, I can do this in C, I know how, but I -really- don't want to because it is a ridicluous pain in the the ass to do this in a low level language. So if someone can suggest a simple bash script (maybe using awk) that could do this it would be greatly appreciated.
TIA
Kyle