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

	<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>2004-06-18T12:59:38-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-18T12:59:38-04:00</updated>

		<published>2004-06-18T12:59:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37554#p37554</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37554#p37554"/>
		<title type="html"><![CDATA[Need help with file reading operations.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37554#p37554"><![CDATA[
Um... okay I'll look into it soon as I get back<br>after my vacations... 4-5days starting from tommorow.. cya!<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Fri Jun 18, 2004 12:59 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Papillon]]></name></author>
		<updated>2004-06-17T14:26:03-04:00</updated>

		<published>2004-06-17T14:26:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37525#p37525</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37525#p37525"/>
		<title type="html"><![CDATA[Need help with file reading operations.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37525#p37525"><![CDATA[
do a search for <span style="text-decoration:underline">seek</span> on this forum <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=852">Papillon</a> — Thu Jun 17, 2004 2:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-06-17T13:16:01-04:00</updated>

		<published>2004-06-17T13:16:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=37523#p37523</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=37523#p37523"/>
		<title type="html"><![CDATA[Need help with file reading operations.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=37523#p37523"><![CDATA[
Hi,<br><br>I am not good with file operations... and am having<br>a little bit of trouble.<br><br>I have bind which triggers and then adds some text<br>to a file "a" append. So the text is added from the last<br>line.<br><br>I have 2 lines added on my bind trigger.<br>I want to read these lines with the help of 'get'.<br>One of my friends suggested 'exec [cat ..blabla' I'm not<br>good at that.<br><br>****<br>I just need to read the last two lines of a file, everytime they are<br>added into the file on a  trigger. (last and second last lines)<br>Then I need to set them to two different variables.<br>And then use them for processing in my script.<br>****<br><br>Also... how can I make it read say a specific line say line 57.<br>If I want to read a specific line out of the file, how can that be done?<br><br>Here is some what I could come up with, after seeing the<br>File Operations thread in the FAQ section of this forum.<br><div class="codebox"><p>Code: </p><pre><code>set myfile "records.dat"set file [open $myfile "r"] set data [read -nonewline $file] close $fileset lines [split $data "\n"] set lastline [expr [llength $lines] - 1] set secondlastline [expr [llength $lines] - 2] </code></pre></div>Is this correct?? Please help me.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu Jun 17, 2004 1:16 pm</p><hr />
]]></content>
	</entry>
	</feed>
