cat test.txt | sed -e's/\(.*\) \(.*\)/\2,\1/g' | sort