Linux, How to sort the lines of a file

view full story

http://stackoverflow.com – I have a file called abc. The content of abc is: ccc abc ccc ccc a b dd ccc I want to sort the lines of the file and delete all duplicates (in this case ccc are duplicates). In the shell script I use this: sort -u < $1 But the sorted result becomes the standard output instead of saved into the abc file. How do I do this? (HowTos)