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

	<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>2010-09-06T20:07:35-04:00</updated>

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

		<entry>
		<author><name><![CDATA[greenbear]]></name></author>
		<updated>2010-09-06T20:07:35-04:00</updated>

		<published>2010-09-06T20:07:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94227#p94227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94227#p94227"/>
		<title type="html"><![CDATA[Scan log for changes and process (events)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94227#p94227"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set fs [open "|tail -f file.log"]fconfigure $fs -blocking 0 -buffering linefileevent $fs readable [list output $fs]proc output {fs} {putserv "privmsg #chan :[gets $fs]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=24">greenbear</a> — Mon Sep 06, 2010 8:07 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-08-26T23:36:11-04:00</updated>

		<published>2010-08-26T23:36:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94128#p94128</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94128#p94128"/>
		<title type="html"><![CDATA[Scan log for changes and process (events)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94128#p94128"><![CDATA[
Oh, okay, my bad... you could do something with the exec command also. You can put the command in as you would normally, just use exec before.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Thu Aug 26, 2010 11:36 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[supersam]]></name></author>
		<updated>2010-08-26T14:25:40-04:00</updated>

		<published>2010-08-26T14:25:40-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94120#p94120</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94120#p94120"/>
		<title type="html"><![CDATA[Scan log for changes and process (events)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94120#p94120"><![CDATA[
Thank for the reply.  I was looking more for a tail -f script.  In the end I went from a cron job.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11330">supersam</a> — Thu Aug 26, 2010 2:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Luminous]]></name></author>
		<updated>2010-08-25T20:01:47-04:00</updated>

		<published>2010-08-25T20:01:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94107#p94107</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94107#p94107"/>
		<title type="html"><![CDATA[Scan log for changes and process (events)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94107#p94107"><![CDATA[
Hi there. Sounds like you are wanting to either output the whole file line by line, or else create a list containing each line. To do the first, you can do do something like this:<br><div class="codebox"><p>Code: </p><pre><code>set fs [open "file.ext"] while {[gets $fs line] &gt;= 0} {    &lt;actions here&gt; } close $fs</code></pre></div>If you want to create a list of file line elements:<br><div class="codebox"><p>Code: </p><pre><code> set fs [open "file.ext"] set lines [split [read -nonewline $fs] \n]   close $fs</code></pre></div>Be sure to close the file when you are done with it. Leaving one open and opening it again makes for a badly behaved eggie, hehe.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11101">Luminous</a> — Wed Aug 25, 2010 8:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[supersam]]></name></author>
		<updated>2010-08-25T16:43:13-04:00</updated>

		<published>2010-08-25T16:43:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94106#p94106</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94106#p94106"/>
		<title type="html"><![CDATA[Scan log for changes and process (events)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94106#p94106"><![CDATA[
So I would like to get my eggdrop to parse a file continually.  And if a string/regexp matches then follow up with some action.<br><br>The follow up is easy - just not sure how to scan.<br><br>Thanks in advance.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11330">supersam</a> — Wed Aug 25, 2010 4:43 pm</p><hr />
]]></content>
	</entry>
	</feed>
