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

	<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>2013-04-23T00:27:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-04-23T00:27:38-04:00</updated>

		<published>2013-04-23T00:27:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101440#p101440</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101440#p101440"/>
		<title type="html"><![CDATA[what am I doing wrong?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101440#p101440"><![CDATA[
Before the <em class="text-italics">set secs</em> you forgot to add an ;<br><br>Try with:<div class="codebox"><p>Code: </p><pre><code>set reply [exec cut -d. -f1 /proc/uptime]; set secs [expr {$reply % 60}]; set mins [expr {$reply / 60 % 60}]; set hours [expr {$reply / 3600 % 24}]; set days [expr {$reply / 86400}]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Apr 23, 2013 12:27 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-04-22T08:39:24-04:00</updated>

		<published>2013-04-22T08:39:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101433#p101433</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101433#p101433"/>
		<title type="html"><![CDATA[what am I doing wrong?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101433#p101433"><![CDATA[
what about this?<br><div class="codebox"><p>Code: </p><pre><code>[03:59:38] &lt;@spithash&gt; ;set reply {exec cut -d. -f1 /proc/uptime} set secs [expr {$reply % 60}]; set mins [expr {$reply / 60 % 60}]; set hours [expr {$reply / 3600 % 24}]; set days [expr {$reply / 86400}][03:59:40] &lt;@nigger&gt; spithash: #29 Tcl error: can't use non-numeric string as operand of "%"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Mon Apr 22, 2013 8:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2013-04-22T06:15:16-04:00</updated>

		<published>2013-04-22T06:15:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101432#p101432</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101432#p101432"/>
		<title type="html"><![CDATA[what am I doing wrong?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101432#p101432"><![CDATA[
if you wish to store the result of the exec command in the <em class="text-italics">reply</em> variable, then replace:<div class="codebox"><p>Code: </p><pre><code>{exec cut \-d. \-f1 /proc/uptime} reply;</code></pre></div>with either:<div class="codebox"><p>Code: </p><pre><code>set reply [exec cut \-d. \-f1 /proc/uptime]</code></pre></div>or:<div class="codebox"><p>Code: </p><pre><code>catch {exec cut \-d. \-f1 /proc/uptime} reply</code></pre></div>I would go with first option.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Mon Apr 22, 2013 6:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2013-04-22T05:34:59-04:00</updated>

		<published>2013-04-22T05:34:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101428#p101428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101428#p101428"/>
		<title type="html"><![CDATA[what am I doing wrong?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101428#p101428"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>{exec cut \-d. \-f1 /proc/uptime} reply; set secs [expr $reply % 60]; set mins [expr $reply / 60 % 60]; set hours [expr $reply / 3600 % 24]; set days [expr $reply / 86400]</code></pre></div>Can anyone please let me know how can I fix this? what am I doing wrong?<br>I'm not a coder, I'm trying to be one. this is from a script I found and I am trying to fix it.<br><br>The errors I get are:<br><div class="codebox"><p>Code: </p><pre><code>% {exec cut \-d. \-f1 /proc/uptime} reply; set secs [expr $reply % 60]; set mins [expr $reply / 60 % 60]; set hours [expr $reply / 3600 % 24]; set days [expr $reply / 86400]invalid command name "exec cut \-d. \-f1 /proc/uptime"%</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Mon Apr 22, 2013 5:34 am</p><hr />
]]></content>
	</entry>
	</feed>
