I have a shell script A.sh
, it calls a file B.o
to run such as the following
#A.sh
B &
So the ampersand states, I am running the process B at the background. However, if B
produced an error message, I do not want to see it. I tried to redirect the error message when running A.sh
such as
./A 2>&1
but the error messages produced by B
still comes up. Is there a way to suppress the error messages that result from a subprocess?