I have a Bash script:
#!/bin/bash echo this should be visible only in the stderr output but it is not 1>&2 exit 0
Also, I have a custom app that starts this script. The app captures both - stdout and stderr. The stdout is empty and the stderr contains the text provided. So far, so good. But when I start the script from the console (physical terminal):
I expect it to not print anything on the display, but it prints.
I tried various combinations of redirecting, e.g.,
>/dev/stderr, etc. but results are the same. I also tried to redirect stdout to null
1>&2 >/dev/null, but obviously it also sends my text to the null.
Where is this configured? How can I make my terminal to not display stderr?