Hi
I am not if this is possible: is it possible in bach (or another shell) to redirect GLOBALLY the stdout/stderr channels to a file.
So, if I have a script
script.sh
cmd1
cmd2
cmd3
I want all stdout/stderr goes to a file. I know I can do:
./script.sh 1>file 2>&1
OR
script.sh
cmd1 1>>file 2>>&1
cmd2 1>>file 2>>&1
cmd3 1>>file 2>>&1
but, what I want to do, is something like
script.sh
stdout is now 'file'
stderr is now 'file'
cmd1
cmd2
cmd3
Why do I want to do that? I'm just curious
Thanks a lot
Isi
PS: I guess that must be called 'channel duplication' or something like that