perl -e "print map{qq{$_$/}} sort map{chomp; $_} <>;" file.txt