You can use file redirection to redirected the sorted output:
sort input-file > output_fileOr you can use the -o, --output=FILE option of sort to indicate the same input and output file:
sort -o file file原文:https://www.cnblogs.com/kakaisgood/p/10364536.html