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

	<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>2001-11-12T20:28:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-11-12T20:28:00-04:00</updated>

		<published>2001-11-12T20:28:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=1626#p1626</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=1626#p1626"/>
		<title type="html"><![CDATA[last 5 topic]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=1626#p1626"><![CDATA[
It would be more simple, to read in each line from the file into a list, remove the first item in the list and append a new item to the end. The list can then be saved to file, rather than make some hardworking script to replace items.<br><div class="codebox"><p>Code: </p><pre><code>proc file_item_shift {filename newitem} {  set fp [open $filename r]  set r [split [read $fp] "n"]  close $fp  set r [lreplace $r 0 0]  lappend r $newitem  set fp [open $filename w]  foreach _A $r {    puts $fp "$_A"  }  close $fp}</code></pre></div>Not tested, but should work. Should realy make a backup copy of the file as well, to save some heartache later on.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Mon Nov 12, 2001 8:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-11-12T14:54:00-04:00</updated>

		<published>2001-11-12T14:54:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=1618#p1618</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=1618#p1618"/>
		<title type="html"><![CDATA[last 5 topic]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=1618#p1618"><![CDATA[
Hi ! <br><br>I would like to do a stats tcl <br><br>is there a way to save last 5 topic ? well i mean i know how to save topics on a file. But how to ask bot to replace a special line like when 5 topic are saved on the file bot will replace the topic#1 by the topic#6 .... replace topic#2 by topic#7 ..etc understand ? :-/<br><br>not my first language sorry <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_surprised.gif" width="15" height="15" alt=":eek:" title="Surprised">) if someone know a TCL that use something like that let me know thx! <p>Statistics: Posted by Guest — Mon Nov 12, 2001 2:54 pm</p><hr />
]]></content>
	</entry>
	</feed>
