If this is something that you will be doing a lot of in a script or something similiar, wrap the sort command in a shell script that sorts the list to a temp file and mv the temp file to the original filename.
This is a dangerous thing to do berty007. If things go wrong you will not have the source file anymore and thus repairing the damage would be a hassel (you would have to rebuild the source file!)
you could do a test to ensure the new file contains data (test -s <filename> ) before deleteing the original.
You absolutely need an input file and an output file. You can't get around that. You can remove the name from the input file and re-use it for the output file. Like this:
(exec < list ; rm list ; sort > list)
The reason that "$ sort list >list" leaves you with an empty file is that the shell sees that you want output to go to "list" (with >list). Before it even begins that command, it ither creates or truncates the output file. Now you just sorted the file you truncated.