EnergyMech

Forum | Features | Download | Addons | Help | #emech | Links | About | Contact

Versions | News Archive | Installing | Linking | Configuration | Commands | FAQ


The time is now Thursday, April 7th, 2022, 12:23pm

Create account ]   User/Pass   


Forum Index :: Generic Discussion :: exec command in tcl :: Reply to this topic

Author
 
Stelz
Posted :: 11:19am, Fri, Jul 21, 2006     Subject :: exec command in tcl

(anonymous)
 
    Does emech support exec command through the tcl-scripts? couldn't make it work =(

 
jayjwa
Posted :: 4:30am, Fri, Jan 26, 2007     Subject :: tcl exec

(anonymous)
 
    I think it should be like this: %tcl exec <command>
But that doesn't work for some reason. I've found a way
around it using open, puts, and tclscript:




[msg(sid)] %tcl set script [open /home/jayjwa/tclsh.tcl a]
-sid(jayjwa@microsoft.com)- tcl command executed ok
[msg(sid)] %tcl puts $script "exec touch /tmp/im.looking.you"
-sid(jayjwa@microsoft.com)- tcl command executed ok
[msg(sid)] %tcl close $script
-sid(jayjwa@microsoft.com)- tcl command executed ok
[msg(sid)] %tclscript /home/jayjwa/tclsh.tcl
-sid(jayjwa@microsoft.com)- tcl script failed to load

It says it failed to load, but when I look in /tmp, the
file is there. Don't forget to compile your mech with
the PLEASE_HACK_MY_SHELL and TCL flags set. Note this is
like giving a shell on the box the mech is running on.


 

Copyright © 2000-2005 Proton,  All rights reserved. Last edited August 16th, 2005.
HTML 4.01 CSS