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

	<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>2005-04-23T16:25:24-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Porch]]></name></author>
		<updated>2005-04-23T16:25:24-04:00</updated>

		<published>2005-04-23T16:25:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48487#p48487</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48487#p48487"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48487#p48487"><![CDATA[
LOL,  I fixed that soon after posting. <br><br>I did get it to work somewhat, but it seems to lag more and more over time. <br>I gave up and wrote my own bot in perl that works fine. <br><br>Thanks for the help<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6105">Porch</a> — Sat Apr 23, 2005 4:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[arcane]]></name></author>
		<updated>2005-04-18T09:30:03-04:00</updated>

		<published>2005-04-18T09:30:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48257#p48257</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48257#p48257"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48257#p48257"><![CDATA[
whatever it may be - as long as you _always_ write channel with 3 "n" in your script it will work <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2617">arcane</a> — Mon Apr 18, 2005 9:30 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CtrlAltDel]]></name></author>
		<updated>2005-04-17T18:13:29-04:00</updated>

		<published>2005-04-17T18:13:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48224#p48224</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48224#p48224"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48224#p48224"><![CDATA[
<blockquote class="uncited"><div>proc my_watch {nick uhost handle cha<strong class="text-strong"><span style="color:red">nnn</span></strong>el arg}</div></blockquote>Just wondering, is this how it is in the script?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5006">CtrlAltDel</a> — Sun Apr 17, 2005 6:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-17T16:59:18-04:00</updated>

		<published>2005-04-17T16:59:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48223#p48223</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48223#p48223"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48223#p48223"><![CDATA[
you need to understand, that each var is assinged to a specific procedure or namespace. if you create a var in the top level (outside of any proc) it is called a "global" var, or you could say it belongs to the namespace of emtpy string (namespace references use namespacename::var, so if namespacename is an emtpy string it will ::var). If you define a proc with parameters like nick uhost hand chan etc. these var will only be valid within that proc and will not be permanent, means, they will be newly created each time the proc is called.<br>So if you try to "include" the global var "nick" while you have already a var called "nick" within that proc, you will encounter problems, because you try to have 2 vars with one and the same name which logically is impossible <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">.<br><br>So I suggested 2 diffrent solutions:<br><br>1st: rename the temporar var "nick" belonging to the proc<br>ex.: proc my_watch {cnick uhost handle channnel arg} { global nick; ... }<br><br>2nd: don't include the global var "nick" into the proc and refer it direct via its namespace (::nick).<br>ex.: proc my_watch {nick uhost handle channnel arg} { ...; putserv "$::nick" }<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Apr 17, 2005 4:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2005-04-17T16:59:38-04:00</updated>

		<published>2005-04-17T16:58:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48222#p48222</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48222#p48222"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48222#p48222"><![CDATA[
i would suggest not to use tail -f cause that doesn't work, all the time, ive seen that after running tail-f durring a perriod of time that it just quits tailing<br><br>maybe try this<br><br>get the size of the file<br><br>=&gt; get file size filename<br><br>compare to previous size if greater open file seek to the buffer offset and read, .. if smaller then go to the previous file for instance <br><br>syslog =&gt; syslog.0 syslog.1 ...<br><br>do the same set the offset using seek and read then move on to the current , now append the number of read bytes to the current file size<br><br><br>quick:<br><br>1024 &lt; old<br>2049 &lt; new<br>read file 1025 <br>close file<br>set newfilesize 2049 <br><br>loop back to step one<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Apr 17, 2005 4:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Porch]]></name></author>
		<updated>2005-04-17T15:45:02-04:00</updated>

		<published>2005-04-17T15:45:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48219#p48219</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48219#p48219"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48219#p48219"><![CDATA[
Well, I understand the words, but the golbal NICK and a local nick? I don't have a clue what you are saying to do. <br><br>I mucked around with it and hard coded the vars into it. That seems to work. For now. <br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6105">Porch</a> — Sun Apr 17, 2005 3:45 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-17T15:12:45-04:00</updated>

		<published>2005-04-17T15:12:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48216#p48216</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48216#p48216"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48216#p48216"><![CDATA[
<blockquote class="uncited"><div>proc my_watch {nick uhost handle channnel arg} {</div></blockquote>you need to rename this "nick" to something else (like cnick) and everywhere THIS nick is meant and not the global nick.<br>alternatively you can use $::nick referance the global nick and leave nick like it is, remember to remove "nick" from the global line in the 2nd case.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Apr 17, 2005 3:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Porch]]></name></author>
		<updated>2005-04-17T14:36:47-04:00</updated>

		<published>2005-04-17T14:36:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48212#p48212</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48212#p48212"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48212#p48212"><![CDATA[
I am putting it in the wrong spot? I get this error.<br><br><br><br><br>[03:38] Tcl error [my_watch]: variable "nick" already exists<br><br><br><br><div class="codebox"><p>Code: </p><pre><code>bind pub - watch my_watchproc my_watch {nick uhost handle channnel arg} {    global nick fc    if [file readable /home/et/1] {set fc [open "|tail -f /home/et/1"]fconfigure $fc -blocking 0fileevent $fc readable {putserv "privmsg $nick :[gets $fc]"}    }return 1}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6105">Porch</a> — Sun Apr 17, 2005 2:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[De Kus]]></name></author>
		<updated>2005-04-17T06:20:59-04:00</updated>

		<published>2005-04-17T06:20:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48174#p48174</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48174#p48174"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48174#p48174"><![CDATA[
Part of the ultimate story "The Manual":<br><a href="http://www.tcl.tk/man/tcl8.4/TclCmd/global.htm" class="postlink">http://www.tcl.tk/man/tcl8.4/TclCmd/global.htm</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2382">De Kus</a> — Sun Apr 17, 2005 6:20 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Porch]]></name></author>
		<updated>2005-04-17T04:05:44-04:00</updated>

		<published>2005-04-17T04:05:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=48172#p48172</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=48172#p48172"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=48172#p48172"><![CDATA[
Can someone post the full version of this? I really need to tail a file and I don't know enough tcl to make the below script work.  I spent 2 hours looking over the docs and trying stuff with no luck. <br><br>Thanks a bunch.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6105">Porch</a> — Sun Apr 17, 2005 4:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-11-03T22:44:53-04:00</updated>

		<published>2004-11-03T22:44:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42506#p42506</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42506#p42506"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42506#p42506"><![CDATA[
hey quit msg'ing me already and make your fileevent script vars (nick and fc) global; if you could manage to write a proc, you surely know what 'global' is<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Nov 03, 2004 10:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-11-02T21:31:28-04:00</updated>

		<published>2004-11-02T21:31:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42493#p42493</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42493#p42493"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42493#p42493"><![CDATA[
nick and fc need to be global<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Nov 02, 2004 9:31 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-11-02T19:46:53-04:00</updated>

		<published>2004-11-02T19:46:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42492#p42492</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42492#p42492"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42492#p42492"><![CDATA[
put that code in one of my tcl scripts, rehashed the bot, did #watch, went to the website and entered a fake url(so it would add to the error log) went back to chat and there was nothing there<p>Statistics: Posted by Guest — Tue Nov 02, 2004 7:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-11-02T19:30:20-04:00</updated>

		<published>2004-11-02T19:30:20-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42490#p42490</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42490#p42490"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42490#p42490"><![CDATA[
<blockquote class="uncited"><div>doesnt seem to work..8(<br><br>[/code]</div></blockquote>it works for me<br><br>explain what did you do, exactly<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Nov 02, 2004 7:30 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-11-02T18:01:58-04:00</updated>

		<published>2004-11-02T18:01:58-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=42486#p42486</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=42486#p42486"/>
		<title type="html"><![CDATA[tail -f (filename)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=42486#p42486"><![CDATA[
doesnt seem to work..8(<br><div class="codebox"><p>Code: </p><pre><code>bind pub - #watch my_watchproc my_watch {nick uhost handle channel arg} {if [file readable /var/log/httpd/error_log] {  set fc [open "|tail -f /var/log/httpd/error_log"]  fconfigure $fc -blocking 0  fileevent $fc readable {putserv "privmsg $nick :[gets $fc]"}}  return 1}</code></pre></div><p>Statistics: Posted by Guest — Tue Nov 02, 2004 6:01 pm</p><hr />
]]></content>
	</entry>
	</feed>
