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

	<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>2003-12-15T02:16:18-04:00</updated>

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

		<entry>
		<author><name><![CDATA[mdixon4az]]></name></author>
		<updated>2003-12-15T02:16:18-04:00</updated>

		<published>2003-12-15T02:16:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31442#p31442</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31442#p31442"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31442#p31442"><![CDATA[
I have it basically working, only thing I have noticed if is that each time I use the command to find and remove a line from the file it adds an extra blank line to the new file. How can I get it to stop doing that?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3982">mdixon4az</a> — Mon Dec 15, 2003 2:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2003-12-14T14:58:24-04:00</updated>

		<published>2003-12-14T14:58:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31423#p31423</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31423#p31423"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31423#p31423"><![CDATA[
See <a href="http://forum.egghelp.org/viewtopic.php?p=24833" class="postlink">this</a> topic for an example.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Sun Dec 14, 2003 2:58 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mdixon4az]]></name></author>
		<updated>2003-12-14T12:44:16-04:00</updated>

		<published>2003-12-14T12:44:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31416#p31416</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31416#p31416"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31416#p31416"><![CDATA[
Great, I will add that and test it out, make sure I don't mess something up. I would also like to add a search function, can you help me with that as well?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3982">mdixon4az</a> — Sun Dec 14, 2003 12:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[CrazyCat]]></name></author>
		<updated>2003-12-11T03:57:17-04:00</updated>

		<published>2003-12-11T03:57:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31297#p31297</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31297#p31297"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31297#p31297"><![CDATA[
read each line of the file, and increment a counter.<br>if counter != the specified line, copy the line to another file<br>when reached the end of file, delete the old file and rename the new as the old one...<div class="codebox"><p>Code: </p><pre><code>proc del:line {theline} {   global yourfile   set oldfile [open $yourfile r]   set newfile [open tempfile.txt w]   set cnt 0   while { ![eof $oldfile] } {      incr cnt         gets $oldfile templine      if { $cnt != $theline } {         puts $newfile $templine      } else {         putlog "Deleted $templine"      }   }   close $oldfile   close $newfile   file delete -force $yourfile   file rename -force tempfile.txt $yourfile}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=691">CrazyCat</a> — Thu Dec 11, 2003 3:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mdixon4az]]></name></author>
		<updated>2003-12-10T16:42:59-04:00</updated>

		<published>2003-12-10T16:42:59-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31279#p31279</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31279#p31279"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31279#p31279"><![CDATA[
ok, well, I guess that would work too. do !old.info 4 and it would remove line 4 from the file<br><br>how would I do that?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3982">mdixon4az</a> — Wed Dec 10, 2003 4:42 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-10T16:32:01-04:00</updated>

		<published>2003-12-10T16:32:01-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31278#p31278</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31278#p31278"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31278#p31278"><![CDATA[
<blockquote class="uncited"><div>Exact. For example. !new.info would read the file and message the person that used that trigger each line of the file.<br><br>I want to be able to do !old.info and just cut &amp; paste one of the lines after the trigger to get it to remove that line and resave the file.<br><br>Know how?<br><br>Thanks</div></blockquote>I probably know how, but I don't know what '!new.info' would do...do you? If you want exact matches, why do you want the matches in return? a count would make more sense as you already know the contents of each matching line <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Dec 10, 2003 4:32 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mdixon4az]]></name></author>
		<updated>2003-12-10T16:13:17-04:00</updated>

		<published>2003-12-10T16:13:17-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31277#p31277</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31277#p31277"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31277#p31277"><![CDATA[
Exact. For example. !new.info would read the file and message the person that used that trigger each line of the file.<br><br>I want to be able to do !old.info and just cut &amp; paste one of the lines after the trigger to get it to remove that line and resave the file.<br><br>Know how?<br><br>Thanks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3982">mdixon4az</a> — Wed Dec 10, 2003 4:13 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2003-12-10T16:04:21-04:00</updated>

		<published>2003-12-10T16:04:21-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31276#p31276</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31276#p31276"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31276#p31276"><![CDATA[
what kind of search? glob/exact match or by line number?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Wed Dec 10, 2003 4:04 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[mdixon4az]]></name></author>
		<updated>2003-12-10T16:02:02-04:00</updated>

		<published>2003-12-10T16:02:02-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=31275#p31275</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=31275#p31275"/>
		<title type="html"><![CDATA[removing lines from a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=31275#p31275"><![CDATA[
I figured out how to read and message the contents of a file to a user that types a command, but how do you search a file for a specific line and delete it?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3982">mdixon4az</a> — Wed Dec 10, 2003 4:02 pm</p><hr />
]]></content>
	</entry>
	</feed>
