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

	<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>2004-05-27T10:01:54-04:00</updated>

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

		<entry>
		<author><name><![CDATA[awyeah]]></name></author>
		<updated>2004-05-27T10:01:54-04:00</updated>

		<published>2004-05-27T10:01:54-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36633#p36633</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36633#p36633"/>
		<title type="html"><![CDATA[newbiez: how to delete a line from text file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36633#p36633"><![CDATA[
Try this thread.<br>It has Basic file operation commands.<br><br>****<br><a href="http://forum.egghelp.org/viewtopic.php?t=6885" class="postlink">http://forum.egghelp.org/viewtopic.php?t=6885</a><br>****<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4875">awyeah</a> — Thu May 27, 2004 10:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[KrzychuG]]></name></author>
		<updated>2004-05-25T04:23:28-04:00</updated>

		<published>2004-05-25T04:23:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36584#p36584</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36584#p36584"/>
		<title type="html"><![CDATA[newbiez: how to delete a line from text file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36584#p36584"><![CDATA[
I found this code here at forum few month ago:<br><div class="codebox"><p>Code: </p><pre><code># Usage: replaceLines &lt;file&gt; &lt;first line&gt; &lt;last line&gt; [replacement data (optional)]proc replaceLines { args } {   if {[llength $args] &gt;= 3} then {      foreach {file start end} $args break      set cmd [list lreplace [split [read [set f [open $file r]]] \n] $start $end]      close $f      if {[llength $args] &gt; 3} then {lappend cmd [lindex $args 3]}      puts -nonewline [set f [open $file w]] [join [eval $cmd] \n]      close $f   } else {      error "wrong # args: should be \"[lindex [info level 0] 0] file start end ?replacement?\""   }} ;# replaceLines</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3672">KrzychuG</a> — Tue May 25, 2004 4:23 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dollar]]></name></author>
		<updated>2004-05-25T02:41:39-04:00</updated>

		<published>2004-05-25T02:41:39-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36582#p36582</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36582#p36582"/>
		<title type="html"><![CDATA[newbiez: how to delete a line from text file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36582#p36582"><![CDATA[
Read the text file, and copy all lines to an temporary file except the one you want to remove. Then just replace the old with the new.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=4046">dollar</a> — Tue May 25, 2004 2:41 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2004-05-24T23:27:47-04:00</updated>

		<published>2004-05-24T23:27:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=36581#p36581</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=36581#p36581"/>
		<title type="html"><![CDATA[newbiez: how to delete a line from text file?]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=36581#p36581"><![CDATA[
Hi, <br> <br>I'm trying to write a script for eggdrop that received user input and search for that input (a line) in the text file then delete. <br> <br>For example: <br>/msg botnick !delete remove-this-line-in-the-text-file <br> <br>then the result should remove the line "remove-this-line-in-the-text-file" in the textfile.txt. <br> <br> <br>Also need to play back the textfile.txt back to user when user issued command: /msg botnick !list <br> <br>thanks all, <br> <br>GT<p>Statistics: Posted by Guest — Mon May 24, 2004 11:27 pm</p><hr />
]]></content>
	</entry>
	</feed>
