$ cat a.txt > a.txt
Why does this above command make a.txt empty?
Base on my understanding, cat a.txt is going to shows the a.txt, then write the output to a.txt. It should do nothing, but why a.txt become empty? Can someone please explain it? Thanks.