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

	<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>2006-06-07T12:09:47-04:00</updated>

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

		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2006-06-07T12:09:47-04:00</updated>

		<published>2006-06-07T12:09:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63797#p63797</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63797#p63797"/>
		<title type="html"><![CDATA[Insert Line After Regular Interval]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63797#p63797"><![CDATA[
1. read the file into list in memory<br>2. manipulate the list using [linsert] or [lreplace]<br>3. write the list back to disk file<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Jun 07, 2006 12:09 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[StaleJoke]]></name></author>
		<updated>2006-06-07T11:54:29-04:00</updated>

		<published>2006-06-07T11:54:29-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=63796#p63796</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=63796#p63796"/>
		<title type="html"><![CDATA[Insert Line After Regular Interval]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=63796#p63796"><![CDATA[
If this is covered somewhere else then please direct me there because i couldnt find it.<br><br>I am trying to insert a line in a text file, starting after a certain line and then at regular intervals till eof.<br><br>Not to mention that this works in a wierd way.<br><div class="codebox"><p>Code: </p><pre><code>proc main {nick host hand chan rest} {global opfileset logfile [open $opfile(list) r]set lines [split [read -nonewline $logfile] "/n"]set totlines [llength $lines]set fp [open $opfile(final) a]set num 7while {$num &lt;= $totlines} {set lines [linsert $lines $num $opfile(insert)]puts $fp [join $lines "\n"]set num [expr {$num + 5}]} close $fp close $logfile}</code></pre></div>Any help ?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7046">StaleJoke</a> — Wed Jun 07, 2006 11:54 am</p><hr />
]]></content>
	</entry>
	</feed>
