shell sort result to self

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:

sort -o file file
原文地址:https://www.cnblogs.com/kakaisgood/p/10364536.html