I have a doubt about a simple command and it is because in bash if I do
sort file.txt > file.txt
file .txt remains empty (it shouldn't keep file.txt with what it had before but sorted) but if I do
sort file.txt >> file.txt
then the ordered elements are added to the previous elements.