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

	<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-10-09T18:46:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2001-10-09T18:46:00-04:00</updated>

		<published>2001-10-09T18:46:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=428#p428</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=428#p428"/>
		<title type="html"><![CDATA[search for a word in a file and rename the word next to it]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=428#p428"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set text "let's get some sexy goats"regsub -all -- {(^|W)(sexy) w*} $text {12 sheep} newtext# now it's "let's get some sexy sheep"</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Tue Oct 09, 2001 6:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[ppslim]]></name></author>
		<updated>2001-10-09T18:33:00-04:00</updated>

		<published>2001-10-09T18:33:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=426#p426</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=426#p426"/>
		<title type="html"><![CDATA[search for a word in a file and rename the word next to it]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=426#p426"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set word1 "hello"set word2 "bob"set word3 "replace"set file "blah"file copy -force -- $file "${file}.bak"set rfp [open "${file}.bak" r]set wfp [open $file w]while {![eof $rfp]} {  set s [gets $rfp]  while {[string match "* $word1 $word2 *" $s]} {    set s [string replace $s [string first $word2 $s] [string wordend $s [string first $word $s]] $word3]  }  puts $wfp $s}close $wfpclose $rfp</code></pre></div>Note, this is untested.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2">ppslim</a> — Tue Oct 09, 2001 6:33 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-10-09T17:51:00-04:00</updated>

		<published>2001-10-09T17:51:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=420#p420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=420#p420"/>
		<title type="html"><![CDATA[search for a word in a file and rename the word next to it]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=420#p420"><![CDATA[
say the file has:<br>hello bob<br>how can i make it search the file for hello and replace bob with another word?<p>Statistics: Posted by Guest — Tue Oct 09, 2001 5:51 pm</p><hr />
]]></content>
	</entry>
	</feed>
