01 / 08
> cannot catch an error
Let us try something. ls a file that is not there, and point the result at a file with >.
ls missing.txt > out.txtThe error comes out on the screen anyway. And out.txt is empty.
That feels wrong, doesn't it? You pointed the way out at a file, so why is it on the screen?
Because errors come out of a different way out.
~ $ ls missing.txt > out.txtls: missing.txt: No such file or directory~ $ wc -c out.txt0 out.txt