#! /bin/bash while read line do set `echo $line` echo $5 $1 >> /tmp/t$$ done sort /tmp/t$$ rm /tmp/t$$