Usually if we want to redirect script output to file we simply do
/etc/create_connection.sh > file.debug.txt
Or
/etc/create_connection.sh | tee –a file.debug.txt
But What I want is to add /etc/create_connection.sh > file.debug.txt inside the script , but I not sure if it possible and how?
so when I run just
/etc/create_connection.sh
I need that all standard output will write to file.debug.txt
so what I need to add in my script in order to do that?
simple write
exec > file.debug.txt
in the beginning.link: http://www.faqs.org/docs/abs/HTML/io-redirection.html