I have a bash script that simply calls different calls and redirect stdout and stderr outputs to different files.
I've done this:
command 1> datafile 2>> errorfile
However, when the command is erroneous (e.g. wrong username and password combination given as arguments), the error message does not get redirected to the errorfile. I still see the error message on my screen when I run this script. For instance, the error message indicates that I provided a wrong combination of username and password.
What am I doing wrong? I thought I should see no output on screen because I'm redirecting both stdout and stderr to files.