Usually if we want to redirect script output to file we simply do

   /etc/create_connection.sh > file.debug.txt  


   /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


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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.