Let us say I have some file called a.txt in the current directory. It's chmod value is 000.
Therefore, if I try to write to it, I get the following output:
> printf "Hello" >> a.txt
-bash: a.txt: Permission denied
How can I suppress this output? I have tried appending 2>/dev/null to my command, but this redirection does not seem to work as I had originally hoped.