You can use file redirection to redirected the sorted output:
sort input-file > output_file
Or you can use the -o, --output=FILE option of sort to indicate the same input and output file:
-o
--output=FILE
sort -o file file