How can I sort a file and output it to a newly created file?
Let's say I have Names.txt containing a list of names. I want to reverse sort Names.txt; create a new file called SortedNames.txt; and output the sort to the newly created file; ideally, these should be done in a single statement.