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

	<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-24T16:52:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-24T16:52:00-04:00</updated>

		<published>2002-05-24T16:52:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7234#p7234</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7234#p7234"/>
		<title type="html"><![CDATA[Reading a certain line of a text file....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7234#p7234"><![CDATA[
Cheers ppl...Just so ya know im using ppslim's idea cos its neater....cos im needing to get a certain line quite frequently!!!<p>Statistics: Posted by Guest — Fri May 24, 2002 4:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-05-24T14:49:00-04:00</updated>

		<published>2002-05-24T14:49:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7233#p7233</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7233#p7233"/>
		<title type="html"><![CDATA[Reading a certain line of a text file....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7233#p7233"><![CDATA[
well, ppslim's way is cpu intensive, your way is ram intensive. which method is the best to use depends on the length of the file.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Fri May 24, 2002 2:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wcc]]></name></author>
		<updated>2002-05-24T13:17:00-04:00</updated>

		<published>2002-05-24T13:17:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7232#p7232</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7232#p7232"/>
		<title type="html"><![CDATA[Reading a certain line of a text file....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7232#p7232"><![CDATA[
It would make more sense to me to read the entire file with [read $channel], split it by n, then use lindex to pull lines.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=270">Wcc</a> — Fri May 24, 2002 1:17 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2002-05-24T11:56:00-04:00</updated>

		<published>2002-05-24T11:56:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7230#p7230</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7230#p7230"/>
		<title type="html"><![CDATA[Reading a certain line of a text file....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7230#p7230"><![CDATA[
There is no way. Allthough you could create a proc that will do the the gets 5 times for you.<br><div class="codebox"><p>Code: </p><pre><code>proc get_line {file line} {  set fp [open $file r]  set r {}  while {![eof $fp]} {    set i 0    while {$i &lt; $line} {      set r [gets $fp]      incr i    }    break  }  catch {close $fp}  return $r}</code></pre></div>Then you can use it like<br><div class="codebox"><p>Code: </p><pre><code>my code hereset test [get_line file.name 5]</code></pre></div>which will get line 5<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Fri May 24, 2002 11:56 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-05-24T09:22:00-04:00</updated>

		<published>2002-05-24T09:22:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=7227#p7227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=7227#p7227"/>
		<title type="html"><![CDATA[Reading a certain line of a text file....]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=7227#p7227"><![CDATA[
Without doing gets $channel line 5 times....how can i read the 5th line of a file?<p>Statistics: Posted by Guest — Fri May 24, 2002 9:22 am</p><hr />
]]></content>
	</entry>
	</feed>
