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

	<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>2005-01-15T15:46:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2005-01-15T15:46:50-04:00</updated>

		<published>2005-01-15T15:46:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45420#p45420</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45420#p45420"/>
		<title type="html"><![CDATA[Jump to line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45420#p45420"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>set data "RANDOM0\nConstant\nRANDOM1\nRANDOM2\nRANDOM3\nRANDOM4\nRANDOM5"if {[set a [lsearch -exact [set b [split $data \n]] "Constant"]] != -1} {   putlog "constant: [lindex $b $a]"  putlog "random4: [lindex $b [expr $a + 4]]"}</code></pre></div>produces:<blockquote class="uncited"><div>constant: Constant<br>random4: RANDOM4</div></blockquote>however, at second glance, it seems you want to check if "Constant" is in the line, rather than if the line equals "Constant". Try replacing -exact with -glob for the lsearch, and setting the pattern to "*Constant*".<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Sat Jan 15, 2005 3:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[micky]]></name></author>
		<updated>2005-01-15T14:51:03-04:00</updated>

		<published>2005-01-15T14:51:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45414#p45414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45414#p45414"/>
		<title type="html"><![CDATA[Jump to line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45414#p45414"><![CDATA[
this code not work :/<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5782">micky</a> — Sat Jan 15, 2005 2:51 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[spock]]></name></author>
		<updated>2005-01-15T12:50:15-04:00</updated>

		<published>2005-01-15T12:50:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45410#p45410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45410#p45410"/>
		<title type="html"><![CDATA[Jump to line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45410#p45410"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[set a [lsearch -exact [set b [split [egghttp:data $sock] \n]] "Constant"]] != -1} { putlog "random4: [lindex $b [expr $a + 4]]" }</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2369">spock</a> — Sat Jan 15, 2005 12:50 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[micky]]></name></author>
		<updated>2005-01-15T09:55:24-04:00</updated>

		<published>2005-01-15T09:55:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45406#p45406</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45406#p45406"/>
		<title type="html"><![CDATA[Jump to line]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45406#p45406"><![CDATA[
How i can jump to line in txt:<br><div class="codebox"><p>Code: </p><pre><code>RANDOM0Constant  RANDOM1 RANDOM2RANDOM3 RANDOM4RANDOM5</code></pre></div>Code: <div class="codebox"><p>Code: </p><pre><code>foreach line [split [egghttp:data $sock] \n] {if {[string match "*Constant*" $line]} {putlog "$line"# And i need to write line RANDOM4}}</code></pre></div>thx<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5782">micky</a> — Sat Jan 15, 2005 9:55 am</p><hr />
]]></content>
	</entry>
	</feed>
