Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set -x question

Status
Not open for further replies.

ksbrace

Programmer
May 13, 2000
501
US
Hello,
I'm fairly new to scripting. Is there a way I can pipe the set -x printing to a file instead of to the terminal window. I have set -x at the top of my script and when I try and do this: ./myscript.sh > out.dat & executed statements still go to the terminal window. Thanks in advance!
Kelly

 
Do this:

./myscript.sh > out.dat 2>&1


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top