Need Help regarding tcl- storing o/p messages in a file

Status
Not open for further replies.

pra

Member level 5
Joined
Jan 8, 2005
Messages
85
Helped
6
Reputation
12
Reaction score
2
Trophy points
1,288
Activity points
672
Need Help regarding tcl

I need to run few commands in the tcl.
It executes lot of commands and each command output prints some messages.

I want to store all those in a file. (let says the o/p messages are more than 1000).
I can't go back and trace all those. Is it possible to store those o/p messages in a file.

Thanks in Advance
 

Re: Need Help regarding tcl

Hi,
I had that problem before & could only think of 1 solution: pipe STDOUT to file.

So I created a wrapper file which runs/executes the program I've created.
Since I wrote in shell, I used:
. $DATA/SetupProj |tee SMD_DS.log$(date +%R.%d%b%Y)

where my program code was inside the 'SetupProj' file.

Now, when I run this wrapper file, my outputs are saved inside the generated SMD_DS.log...... file.
Of course, there might be a better solution out there.

Best regards.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…