For example when I am directing a program's output to a file and then I look to that file I will be able to see the exact output that was redirected from stout to this file... Now if a program spits the output to this file and spits out a strerr error, how can I redirect that strerr so it doesn't print on the screen and yet I can check it out also...
for example
prog A spits its output to a file AA
prog B spits its output to a file BB and spits out an error message on the screen...
SO:
if [ cmp AA solution_file ]; and if correct, i.e. no stderr screen-print I can handle it easily, that is I consider it CORRECT...but
if [ cmp BB solution_file ]; I need to distinguish somehow that this comparison of files is in fact (physically) correct but it additionally generates a stderr message (that I need to hide from the screen) and I need to handle this BB as WRONG
How do I redirect stderr, and how can I check for it? Any help is greatly appreciated...
Thank you
HOWY