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

	<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>2008-11-18T14:37:01-04:00</updated>

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

		<entry>
		<author><name><![CDATA[game_over]]></name></author>
		<updated>2008-11-18T14:37:01-04:00</updated>

		<published>2008-11-18T14:37:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85868#p85868</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85868#p85868"/>
		<title type="html"><![CDATA[File Opperations help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85868#p85868"><![CDATA[
when i whant to delete line in file i use foreach<br><br>see when you find line who starts for example thing1 you replase whit new and dont write again. <br><br>firest you read txt split to lines "\n"<br><br>and foreach line you set some if<br><br>when if is false "== 0" you write old line when is true "==1" you write new line<br><br>in this sense if you whant to delete some line just miss them <br><br>if {[lindex $lineforomtheforech 0] == "thing1"} {;# do nothing} else {puts "$lineforomtheforech"; #same line is writen again}<br><br><br>first row seems to look this way <div class="codebox"><p>Code: </p><pre><code>set listforfirstrow ""set opentxt [open $sometxt "r"]; set format [split [read $opentxt] "\n"]; close $opentxt forech firstrow $format { set listforfirstrow "$listforfirstrow [lindex $firstrow 0]"}putquick "PRIVMSG $chan : $listforfirstrow"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8946">game_over</a> — Tue Nov 18, 2008 2:37 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SL0RD]]></name></author>
		<updated>2008-11-17T15:55:23-04:00</updated>

		<published>2008-11-17T15:55:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=85849#p85849</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=85849#p85849"/>
		<title type="html"><![CDATA[File Opperations help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=85849#p85849"><![CDATA[
First off, say you had this:<div class="codebox"><p>Code: </p><pre><code>thing1 discthing2 discthing3 discthing4 disc</code></pre></div>I would like to add a new line but if the line that i want to add starts with thing1 for example instead of adding it again at the end i want to update the existing thing1<br>also how could you delete a line by using lsearch but by searching the first word in each line so i would like to delete things3 for example by searching for thing3<br><br>secondly, say you had that same table, I want to be able to do a command and have it pull the first word from every line and list it in the channel ex: &lt;bot&gt; thing1, thing2, thing3, thing4 <br><br>thanks to anyone who helps me with this.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=10253">SL0RD</a> — Mon Nov 17, 2008 3:55 pm</p><hr />
]]></content>
	</entry>
	</feed>
