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

	<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>2002-06-17T01:15:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-17T01:15:00-04:00</updated>

		<published>2002-06-17T01:15:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8066#p8066</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8066#p8066"/>
		<title type="html"><![CDATA[writing to a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8066#p8066"><![CDATA[
thanks for the replies. stdragon, i have searched EXTENSIVELY looking for a answer but i obviously dont know what to search for, could you please give me a pointer on what to search for? thanks.<p>Statistics: Posted by Guest — Mon Jun 17, 2002 1:15 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-06-16T07:22:00-04:00</updated>

		<published>2002-06-16T07:22:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8044#p8044</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8044#p8044"/>
		<title type="html"><![CDATA[writing to a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8044#p8044"><![CDATA[
We should make a little fileutil.tcl that has all these commonly used functions in them. People seem to ask several main questions:<br><br>how do I read a random line<br><br>how do I delete a line<br><br>how do I search for a line<br><br>how do I read all the lines into a list<br><br>how do I insert a line at the (beginning|end)<br><br>But I guess these are the same people who are too lazy to search for the answers that have already been given. They probably wouldn't bother getting the file. <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Sun Jun 16, 2002 7:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-06-15T09:52:00-04:00</updated>

		<published>2002-06-15T09:52:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8006#p8006</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8006#p8006"/>
		<title type="html"><![CDATA[writing to a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8006#p8006"><![CDATA[
yup, which personally I try to avoid when I can - the unix standard utils (grep, sed, cut and the like) tend to be quicker for large files<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Sat Jun 15, 2002 9:52 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Wcc]]></name></author>
		<updated>2002-06-15T04:18:00-04:00</updated>

		<published>2002-06-15T04:18:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8002#p8002</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8002#p8002"/>
		<title type="html"><![CDATA[writing to a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8002#p8002"><![CDATA[
You can't delete a line directly with Tcl. You need to read the entire file, remove the line, and rewrite the file.<br><br>Wcc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=270">Wcc</a> — Sat Jun 15, 2002 4:18 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-06-15T03:27:00-04:00</updated>

		<published>2002-06-15T03:27:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=8000#p8000</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=8000#p8000"/>
		<title type="html"><![CDATA[writing to a text file]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=8000#p8000"><![CDATA[
i am NEW to tcl scripting, i am trying to create a script that users can search and delete items from a separate file containing the items, i have the searching part worked out, i am having trouble with the deleting of items. each item is on a separate line. is there anyway of deleting a line in tcl? Because currently i am overwriting the line and in a lot of cases this causes the next line to be messed up because i don't know how to overwrite the exact amount of characters in the line i want to kill. Could some one please see if they understand what im saying, and if you coul kick me in the right direction i would REALLY appreciate it.<br><br>cheers<br><br>&lt;font size=-1&gt;[ This Message was edited by: fizzik on 2002-06-15 01:29 ]&lt;/font&gt;<p>Statistics: Posted by Guest — Sat Jun 15, 2002 3:27 am</p><hr />
]]></content>
	</entry>
	</feed>
