$ perl -pe '$_ = rand(100000000). " $_"' bigfile \ | sort -k 1n | perl -pe 's/^\d+ //' > bigfile_sorted