$ cat test.txt This is a test file. $ tr 'a' 'z' < test.txt This is z test file. $ tr 'a' 'z' < test.txt > test.txt $ cat test.txt $
Why does tr seem to output nothing to test.txt? I found this thread, but I don't really understand what is going on, and how to fix the problem.
(Also, the reason I'm not using sed is because I want to replace newlines with another character, and I don't think sed can operate on a non-line-by-line basis?)