set() can be used for the purpose of parsing the line into tokens. The tokens can then be re-ordered.
Sorry, I don't have a functional example to provide, but it goes something like this:
tmpfile = "MyTmpFile"
# You may want to change the field separator value. Here it is set to ":"
# If not, ignore the next 2 lines.
orig_IFS = $IFS
IFS = ":"
while read line
# Tokenize the input line.
# You now have the tokens of the input line.
print "token 1 ..... $1"
print "token 2 ..... $2"
print "token 9 ..... $9"
# Do your magic. Re-order them?
print "$2 $9 $1" > $tmpfile
# Sort the tempfile, selecting the field(s) of interest.
I hope this is what you are after.