<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/3467" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2003-01-16T12:10:07-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/3467</id>

		<entry>
		<author><name><![CDATA[digitaldj]]></name></author>
		<updated>2003-01-16T12:10:07-04:00</updated>

		<published>2003-01-16T12:10:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15416#p15416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15416#p15416"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15416#p15416"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[catch {set output [exec $binary $who]} err]} {   set output $err } </code></pre></div>worked <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"> thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2491">digitaldj</a> — Thu Jan 16, 2003 12:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-16T12:02:14-04:00</updated>

		<published>2003-01-16T12:02:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15415#p15415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15415#p15415"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15415#p15415"><![CDATA[
It is not the Tcl script that is faulting.<br><br>The .sh script is the one doing output to STDERR.<br><br>When you do the exec command, so somthing like<br><div class="codebox"><p>Code: </p><pre><code>if {[catch {set output [exec $binary $who]} err]} {  set output $err}</code></pre></div>I realy don't know what the .sh script is outputing. I only know that at one stage, it output to STDERR.<br><br>As such, if the .sh script places somthing to the STDERR channel, the Tcl will use the error message instead of the message sent to STDIN.<br><br>If you want to capture both the STDIN and STDERR messages, then replace the "set output $err" line with<br><div class="codebox"><p>Code: </p><pre><code>append output "${err}\n"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 16, 2003 12:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[digitaldj]]></name></author>
		<updated>2003-01-16T11:40:33-04:00</updated>

		<published>2003-01-16T11:40:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15414#p15414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15414#p15414"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15414#p15414"><![CDATA[
i cant paste my own code, since im not home and the server is local, but the script im talking about here now only does this:<br><br>set binary {/glftpd/bin/tur-trial.sh}<br>set who [lindex $text 0]<br>set output [exec $binary $who]<br>putserv "PRIVMSG $chan :$output"<br><br>so how do i change where to output?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2491">digitaldj</a> — Thu Jan 16, 2003 11:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-16T11:25:08-04:00</updated>

		<published>2003-01-16T11:25:08-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15412#p15412</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15412#p15412"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15412#p15412"><![CDATA[
The Tcl exec command will cause a TCL_ERROR, if it receives any output via STDERR.<br><br>This is what causes this issue. You script must output to STDERR.<br><br>Either change your script to output on STDOUT, rather than ERR, or use the Tcl "catch" command.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 16, 2003 11:25 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[digitaldj]]></name></author>
		<updated>2003-01-16T11:17:19-04:00</updated>

		<published>2003-01-16T11:17:19-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15410#p15410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15410#p15410"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15410#p15410"><![CDATA[
well, the script i downloaded that worked on a linux server, is a addon for the glftpd. the error is:<br><br>[13:56] Tcl error [pub:trialscript]: user is missing 2000 MB to pass with 3 days remaining, which means another 666 MB per day (2000 MB/week).<br><br>it's the same type of error on my script.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2491">digitaldj</a> — Thu Jan 16, 2003 11:17 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2003-01-16T11:05:28-04:00</updated>

		<published>2003-01-16T11:05:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15408#p15408</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15408#p15408"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15408#p15408"><![CDATA[
A copy of the error itself will usualy help.<br><br>The messages can be rather informative, and we can 9/10 times tell you your problem without tseeing the code (though tell you exactly what to change is another problem).<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu Jan 16, 2003 11:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[digitaldj]]></name></author>
		<updated>2003-01-16T10:55:36-04:00</updated>

		<published>2003-01-16T10:55:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15406#p15406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15406#p15406"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15406#p15406"><![CDATA[
hmm.. well, there is one thing. i downloaded some other script with exec and .sh, and it runs perfect on a linux server with the newest eggdrop. but when i tried it on a freebsd with the newest 'drop it came with a tcl error. any diffrense between the os's when it comes to eggdrop? hm. might be the TCL, maybe i've got an old version or something<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2491">digitaldj</a> — Thu Jan 16, 2003 10:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-16T10:45:28-04:00</updated>

		<published>2003-01-16T10:45:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15405#p15405</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15405#p15405"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15405#p15405"><![CDATA[
Your welcome. Post an reply if you stuck or something like this. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=":wink:" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jan 16, 2003 10:45 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[digitaldj]]></name></author>
		<updated>2003-01-16T10:30:51-04:00</updated>

		<published>2003-01-16T10:30:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15404#p15404</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15404#p15404"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15404#p15404"><![CDATA[
hehe.. yea, should help <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"> thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2491">digitaldj</a> — Thu Jan 16, 2003 10:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-01-16T10:24:29-04:00</updated>

		<published>2003-01-16T10:24:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15402#p15402</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15402#p15402"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15402#p15402"><![CDATA[
See <a href="http://tcl.activestate.com/man/tcl8.2.3/TclCmd/foreach.htm" class="postlink">http://tcl.activestate.com/man/tcl8.2.3 ... oreach.htm</a> for examples. Also be careful with the exec thing.. Read more about how to use it here: <a href="http://tcl.activestate.com/man/tcl8.2.3/TclCmd/exec.htm" class="postlink">http://tcl.activestate.com/man/tcl8.2.3/TclCmd/exec.htm</a><br><br>Also you may want to use: bgexec.tcl wich is a "TCL for other scripters to use as a replacement for the 'exec' tcl command, as it uses non-blocking i/o." You can find it here: <a href="http://www.tclscript.com/" class="postlink">http://www.tclscript.com/</a> or download it directly from: <a href="http://strike.vectorstar.net/cgi-bin/dlcount.cgi?get=bgexec.tcl.gz" class="postlink">http://strike.vectorstar.net/cgi-bin/dl ... xec.tcl.gz</a><br><br>Hope this helps. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Thu Jan 16, 2003 10:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[digitaldj]]></name></author>
		<updated>2003-01-16T09:45:25-04:00</updated>

		<published>2003-01-16T09:45:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=15400#p15400</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=15400#p15400"/>
		<title type="html"><![CDATA[exec help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=15400#p15400"><![CDATA[
hi. I'm working on a little script, and it's suppose to run a .sh file. But if the return is more than 1 line, it gives a TCl error. i was told to use 'foreach', so can anyone give me an example or something? thanks.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2491">digitaldj</a> — Thu Jan 16, 2003 9:45 am</p><hr />
]]></content>
	</entry>
	</feed>
