I am a beginner in Unix and I need to write a bash shell script which outputs the message:
I am standard output
to standard output, and
I am standard error
to standard error.
To demonstrate that the script functions correctly, I need to first redirect standard output to
/dev/null
then redirect standard error to that same file.
I have written the following lines in a script:
echo 'I am standard output'>&1>/dev/null
echo 'I am standard error'>&2>/dev/null
However, I fail to see how I could verify my scripts. Where can I see the /dev/null file? How can I make sure the scripts function properly?