<?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/1757" />

	<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>2002-05-25T05:57:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[tainted]]></name></author>
		<updated>2002-05-25T05:57:00-04:00</updated>

		<published>2002-05-25T05:57:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7245#p7245</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7245#p7245"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7245#p7245"><![CDATA[
Bingo.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1256">tainted</a> — Sat May 25, 2002 5:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-05-23T20:43:00-04:00</updated>

		<published>2002-05-23T20:43:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7217#p7217</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7217#p7217"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7217#p7217"><![CDATA[
yes, pipes are a function of a shell, but there's nothing stopping ya executing a shell to run it it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":razz:" title="Razz"><br>for example:<br>exec sh -c {ls |grep blah}<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Thu May 23, 2002 8:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-05-23T17:43:00-04:00</updated>

		<published>2002-05-23T17:43:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7215#p7215</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7215#p7215"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7215#p7215"><![CDATA[
The pipe operator "|" is something interpreted by the shell you're using, not the operating system. So you can't use that with exec. Grep is easy to simulate in tcl, just use regexp and print the line if it matches.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu May 23, 2002 5:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-23T16:56:00-04:00</updated>

		<published>2002-05-23T16:56:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7212#p7212</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7212#p7212"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7212#p7212"><![CDATA[
Ok well adding the : worked well, thanks loads, i cant believe i missed it.<br><br>Ive decided to put it all in one tcl, using the command shown above.<br><br>the problem ive now come against is <br>using<br>[exec cat /proc/cpuinfo|grep '^model name']<br><br>doesnt seem to work. <br><br>do i need to add " " around certain parts of it?<br><br>Thanks for replying guys, much appreciated<br><br>&lt;font size=-1&gt;[ This Message was edited by: Dragon-Tzu on 2002-05-23 15:14 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Thu May 23, 2002 4:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-05-23T07:06:00-04:00</updated>

		<published>2002-05-23T07:06:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7191#p7191</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7191#p7191"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7191#p7191"><![CDATA[
This may cause problems if the script returns more than one line, as the queue will have a load of dribble inserted into it (remember you can only sent a newline to a server, when you have finished a command, not when you want to drop to a new line)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Thu May 23, 2002 7:06 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tainted]]></name></author>
		<updated>2002-05-22T17:56:00-04:00</updated>

		<published>2002-05-22T17:56:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7177#p7177</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7177#p7177"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7177#p7177"><![CDATA[
Could also just drop that shell script and have this in your proc:<br><br>putserv "PRIVMSG $chan : System: [exec uname]"<br><br><br>&lt;font size=-1&gt;[ This Message was edited by: tainted on 2002-05-22 15:58 ]&lt;/font&gt;<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=1256">tainted</a> — Wed May 22, 2002 5:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-05-20T11:30:00-04:00</updated>

		<published>2002-05-20T11:30:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7099#p7099</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7099#p7099"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7099#p7099"><![CDATA[
This is because of the puthelp command you have used.<br><br>On IRC, you can only sent 1 non-breaking string (AKA, 1 word) to the server, unless you sent a : before the string.<br><br>Try using<br><br>puthelp "PRIVMSG $chan :${result}"<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon May 20, 2002 11:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-20T11:23:00-04:00</updated>

		<published>2002-05-20T11:23:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7098#p7098</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7098#p7098"/>
		<title type="html"><![CDATA[TCL wont display anything after a space from shell script ou]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7098#p7098"><![CDATA[
Hi, im trying to write a basic script to echo the output of a shell script to a channel on the !stat command.<br><br>The shell script extracts certain information from the computer and echo's the result, for example<br><br>sysType=`uname`<br>echo "[System : $sysType]"<br><br>This gives the following output to the console<br>System : Linux<br><br>( there are other lines like for cpu and process info as well)<br><br>In the tcl i have got the code<br><br>proc displayStats {chan args} {<br>set stat[open "|/home/toby/eggdrop/scripts/stat.sh" r]<br>while {![eof $stat]} {<br>catch {set result [gets $stat]}<br>puthelp "PRIVMSG $chan $result"<br>}<br>catch {close $stat}<br>}<br><br>Which goes down the lines writing them to the channel.<br><br>THE PROBLEM IS:<br><br>When it outputs it to the channel it stops as soon as it hits a space. For example :<br><br>&lt;bot&gt; [System<br><br>where it should be<br><br>&lt;bot&gt; [System : Linux]<br><br>Im using the tcl-8.3.3-65 and eggdrop version eggdrop v1.6.10 on a redhat 7.2 system with 2.4.7-10 kernel<br><br>Any help would be much appreciated, im on icq 50572181 if anyone wants to ask me about it.<br><br>Thanks in advance guys, Dragz<br><br><br><br><br>&lt;font size=-1&gt;[ This Message was edited by: Dragon-Tzu on 2002-05-20 09:24 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Mon May 20, 2002 11:23 am</p><hr />
]]></content>
	</entry>
	</feed>
