sorting a file

0xc0a80101
0xc0a80108
0xc0a80129
0x20
0xc0a80201
0xc0a80201
0xc0a80201
0xc0a80201
0xc0a80202
0xc0a80201
0xc0a80202
0xc0a80201
0x20

I want to sort this file.
The command that i am using is sort -u diff1.txt | tee diff1.txt
but diff1.txt is always empty.
what am I doing wrong

you cannot 'tee' to the same file you're sort-ing.

sort -u diff1.txt | tee diff1_sorted.txt

thanks...i did'nt know that

well. actually you can.... but I don't like it:

sort -u < diff.txt | tee diff.txt