This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Exec cmd shell by eggdrop

Help for those learning Tcl or writing their own scripts.
Post Reply
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Exec cmd shell by eggdrop

Post by garfwen »

Hello

Im trying to exec a command by eggdrop.

my eggdrop directory:
/home/hl/eggdrop

And im trying to:
gzip ~/steam/cstrike/err.dem

(err.dem is located as /home/hl/steam/cstrike/err.dem)

Code: Select all

set fp [open "| gzip ~/steam/cstrike/err.dem"]
set data [read $fp]
putlog $data
close $fp
Getting this error:
gzip: ~/hltv1/cstrike/err.dem: No such file or directory


Any idea :\ ?
g
garfwen
Halfop
Posts: 61
Joined: Wed Mar 12, 2008 5:16 pm

Post by garfwen »

Oupps

Code: Select all

set fp [open "| gzip /home/hl/steam/cstrike/err.dem"] 
Fixed.
User avatar
tomekk
Master
Posts: 255
Joined: Fri Nov 28, 2008 11:35 am
Location: Oswiecim / Poland
Contact:

Post by tomekk »

open, run a new program with I/O connected to a file descriptor
exec, run a new program as a subprocess

http://www.tcl.tk/man/tcl8.5/tutorial/Tcl26.html

http://www.tcl.tk/man/tcl8.4/TclCmd/exec.htm
http://www.tcl.tk/man/tcl8.5/TclCmd/exec.htm

;)
Post Reply