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

	<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>2017-01-09T15:16:50-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2017-01-09T15:16:50-04:00</updated>

		<published>2017-01-09T15:16:50-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105702#p105702</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105702#p105702"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105702#p105702"><![CDATA[
Thank you, <strong class="text-strong">SpiKe^^</strong>.<p>Statistics: Posted by Guest — Mon Jan 09, 2017 3:16 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2017-01-09T14:52:46-04:00</updated>

		<published>2017-01-09T14:52:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105701#p105701</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105701#p105701"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105701#p105701"><![CDATA[
Let's try this and see what we don't like about it:)<br><div class="codebox"><p>Code: </p><pre><code>#################################################################################################### putlog "TextSearcher v0.2 - 1st Offcial Release by IsP (q_lander@hotmail.com)" # # This script simply searches a txt file (or text files) for search criteria specified via pub # or msg commands. It Lets you search within a text file for key words using case insensitive # trigger commands. # # Test on eggdrop v1.6.X.....use at own risk ;) # # This script was originally made from another script for 1Real by y0manda, #    rewritten from ground up by IsP@Underent.org # # TODO: # - You tell me? # # v0.1 - 1st scripted # v0.2 - Fixed the counter to display the correct count! #      - Minor bug fix with proc $args - opps, was a mistake, honest ;P # #################################################################################################### #Where are the data files? (Use "{file location1} {file location2} {file location 3} {etc...}") set cd_release "scripts/MCC/search_file" #Which channels do I check for the command? set rlschans "#BotZone" #Max number of outputs? set rlsmaxsearch 9 #What's the public trigger? set cmdsearch "!search" #What Users are allowed to use this trigger/command? (Leave blank for anyone) set rlsflag "" #Set your inital tag info here set rlsinfo "" ########## DO NOT EDIT BELOW ########## if {$rlsflag == ""} {set rlsflag "-"} bind pub $rlsflag $cmdsearch rlssearchpub proc rlssearchpub {nick uhost handle chan arg} {    global rlschans    set valch 0    foreach ch [split $rlschans] {if {$chan == $ch} {set valch 1}}    if {$valch == 0} {return}    rlslocate $chan $uhost $handle "PRIVMSG" "$arg" } bind msg $rlsflag $cmdsearch rlssearchmsg proc rlssearchmsg {nick uhost handle arg} {    global rlschans    set valch 0    foreach ch [split $rlschans] {if {[botonchan $ch]} {if {[onchan $nick $ch]} {set valch 1}}}    if {$valch == 0} {return}    rlslocate $nick $uhost $handle "PRIVMSG" "$arg" } proc rlslocate {nick uhost handle type arg} {     global rlsmaxsearch cd_release rlsinfo     if {$arg == ""} {puthelp "$type $nick :Syntax: $cmdsearch &lt;search string&gt;" ;return 0}     regsub -all -- " " ${arg} "*" rlsarg     puthelp "$type $nick : $rlsinfo ...Searching for '$rlsarg'"     set totrlsfound 0     set alltext ""     foreach database $cd_release {         set line 0        set rlsfile [open $database r]         while {![eof $rlsfile]} {          incr line         set rlsline [gets $rlsfile]          if {[string match -nocase "*$rlsarg*" $rlsline]} {             incr totrlsfound 1               lappend alltext "\[$line\] $rlsline"         }         }         close $rlsfile     }     if {$alltext != ""} {       set cnt 0       foreach allline [lreverse $alltext] {          incr cnt          if {$cnt &gt; $rlsmaxsearch} {  break  }          puthelp "$type $nick : \002Found:\002 $allline"       }     }     if {$totrlsfound &gt; $rlsmaxsearch} {puthelp "$type $nick :There are over $rlsmaxsearch matches. Please be more specific"}     puthelp "$type $nick :There was a total of $totrlsfound entries matching your query." } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Jan 09, 2017 2:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2017-01-09T14:22:44-04:00</updated>

		<published>2017-01-09T14:22:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105700#p105700</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105700#p105700"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105700#p105700"><![CDATA[
<blockquote class="uncited"><div>Which version of the script are you using? (sort from top or bottom)</div></blockquote>This: <a href="http://forum.egghelp.org/viewtopic.php?p=101084#101084" class="postlink">http://forum.egghelp.org/viewtopic.php?p=101084#101084</a><p>Statistics: Posted by Guest — Mon Jan 09, 2017 2:22 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2017-01-09T14:01:43-04:00</updated>

		<published>2017-01-09T14:01:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105699#p105699</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105699#p105699"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105699#p105699"><![CDATA[
Bart:  in tcl everything is possible...<br><br>Which version of the script are you using? (sort from top or bottom)<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Mon Jan 09, 2017 2:01 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2017-01-09T12:53:05-04:00</updated>

		<published>2017-01-09T12:53:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105698#p105698</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105698#p105698"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105698#p105698"><![CDATA[
Is it possible to display the line number?<p>Statistics: Posted by Guest — Mon Jan 09, 2017 12:53 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-02-21T13:48:07-04:00</updated>

		<published>2013-02-21T13:48:07-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101087#p101087</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101087#p101087"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101087#p101087"><![CDATA[
Thanks dirty &amp; Spike^^, much appreciated<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Thu Feb 21, 2013 1:48 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-21T13:43:32-04:00</updated>

		<published>2013-02-21T13:43:32-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101086#p101086</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101086#p101086"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101086#p101086"><![CDATA[
Bleah .. good work Spike.. i forgot to modify that protection.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Thu Feb 21, 2013 1:43 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[SpiKe^^]]></name></author>
		<updated>2013-02-21T12:28:43-04:00</updated>

		<published>2013-02-21T12:28:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101084#p101084</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101084#p101084"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101084#p101084"><![CDATA[
Believe that's because the script was still counting the found lines from the top of the file.<br>This version doesn't count found lines until after finding all matching lines and reversing their order.<br>Also, added a -nocase tag to the string match code, to make the search ignore case.<br><div class="codebox"><p>Code: </p><pre><code>#################################################################################################### putlog "TextSearcher v0.2 - 1st Offcial Release by IsP (q_lander@hotmail.com)" # # This script simply searches a txt file (or text files) for search criteria specified via pub # or msg commands. It Lets you search within a text file for key words using case insensitive # trigger commands. # # Test on eggdrop v1.6.X.....use at own risk ;) # # This script was originally made from another script for 1Real by y0manda, #    rewritten from ground up by IsP@Underent.org # # TODO: # - You tell me? # # v0.1 - 1st scripted # v0.2 - Fixed the counter to display the correct count! #      - Minor bug fix with proc $args - opps, was a mistake, honest ;P # #################################################################################################### #Where are the data files? (Use "{file location1} {file location2} {file location 3} {etc...}") set cd_release "scripts/MCC/search_file" #Which channels do I check for the command? set rlschans "#BotZone" #Max number of outputs? set rlsmaxsearch 9 #What's the public trigger? set cmdsearch "!search" #What Users are allowed to use this trigger/command? (Leave blank for anyone) set rlsflag "" #Set your inital tag info here set rlsinfo "" ########## DO NOT EDIT BELOW ########## if {$rlsflag == ""} {set rlsflag "-"} bind pub $rlsflag $cmdsearch rlssearchpub proc rlssearchpub {nick uhost handle chan arg} {    global rlschans    set valch 0    foreach ch [split $rlschans] {if {$chan == $ch} {set valch 1}}    if {$valch == 0} {return}    rlslocate $chan $uhost $handle "PRIVMSG" "$arg" } bind msg $rlsflag $cmdsearch rlssearchmsg proc rlssearchmsg {nick uhost handle arg} {    global rlschans    set valch 0    foreach ch [split $rlschans] {if {[botonchan $ch]} {if {[onchan $nick $ch]} {set valch 1}}}    if {$valch == 0} {return}    rlslocate $nick $uhost $handle "PRIVMSG" "$arg" } proc rlslocate {nick uhost handle type arg} {     global rlsmaxsearch cd_release rlsinfo     if {$arg == ""} {puthelp "$type $nick :Syntax: $cmdsearch &lt;search string&gt;" ;return 0}     regsub -all -- " " ${arg} "*" rlsarg     puthelp "$type $nick : $rlsinfo ...Searching for '$rlsarg'"     set totrlsfound 0     set alltext ""     foreach database $cd_release {         set rlsfile [open $database r]         while {![eof $rlsfile]} {          set rlsline [gets $rlsfile]          if {[string match -nocase "*$rlsarg*" $rlsline]} {             incr totrlsfound 1             lappend alltext $rlsline          }         }         close $rlsfile     }     if {$alltext != ""} {      set cnt 0      foreach allline [lreverse $alltext] {          incr cnt         if {$cnt &gt; $rlsmaxsearch} {  break  }         puthelp "$type $nick : \002Found:\002 $allline"       }     }     if {$totrlsfound &gt; $rlsmaxsearch} {puthelp "$type $nick :There are over $rlsmaxsearch matches. Please be more specific"}     puthelp "$type $nick :There was a total of $totrlsfound entries matching your query." } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7749">SpiKe^^</a> — Thu Feb 21, 2013 12:28 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-02-21T09:55:49-04:00</updated>

		<published>2013-02-21T09:55:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101081#p101081</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101081#p101081"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101081#p101081"><![CDATA[
Ok I must have pasted it incorrectly - it works.<br>Thanks dirty!<br><br><br>I have another question though..<br><br><br>I have the following a line in the text file (it is the last line in the file)<br><blockquote class="uncited"><div>Only Brazilian citizens can request a passport<br></div></blockquote>When I typed !search Brazilian <br><br>It did not retrieve that line.<br><br>why?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Thu Feb 21, 2013 9:55 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-21T09:22:28-04:00</updated>

		<published>2013-02-21T09:22:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101080#p101080</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101080#p101080"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101080#p101080"><![CDATA[
Can you please paste the script as you have it right now because I just tested it and it works fine.. I have it like this:<br><br>search_file.tcl<br><div class="codebox"><p>Code: </p><pre><code>#################################################################################################### putlog "TextSearcher v0.2 - 1st Offcial Release by IsP (q_lander@hotmail.com)" # # This script simply searches a txt file (or text files) for search criteria specified via pub # or msg commands. It Lets you search within a text file for key words using case insensitive # trigger commands. # # Test on eggdrop v1.6.X.....use at own risk ;) # # This script was originally made from another script for 1Real by y0manda, #    rewritten from ground up by IsP@Underent.org # # TODO: # - You tell me? # # v0.1 - 1st scripted # v0.2 - Fixed the counter to display the correct count! #      - Minor bug fix with proc $args - opps, was a mistake, honest ;P # #################################################################################################### #Where are the data files? (Use "{file location1} {file location2} {file location 3} {etc...}") set cd_release "scripts/MCC/search_file" #Which channels do I check for the command? set rlschans "#BotZone" #Max number of outputs? set rlsmaxsearch 9 #What's the public trigger? set cmdsearch "!search" #What Users are allowed to use this trigger/command? (Leave blank for anyone) set rlsflag "" #Set your inital tag info here set rlsinfo "" ########## DO NOT EDIT BELOW ########## if {$rlsflag == ""} {set rlsflag "-"} bind pub $rlsflag $cmdsearch rlssearchpub proc rlssearchpub {nick uhost handle chan arg} {    global rlschans    set valch 0    foreach ch [split $rlschans] {if {$chan == $ch} {set valch 1}}    if {$valch == 0} {return}    rlslocate $chan $uhost $handle "PRIVMSG" "$arg" } bind msg $rlsflag $cmdsearch rlssearchmsg proc rlssearchmsg {nick uhost handle arg} {    global rlschans    set valch 0    foreach ch [split $rlschans] {if {[botonchan $ch]} {if {[onchan $nick $ch]} {set valch 1}}}    if {$valch == 0} {return}    rlslocate $nick $uhost $handle "PRIVMSG" "$arg" } proc rlslocate {nick uhost handle type arg} {     global rlsmaxsearch cd_release rlsinfo     if {$arg == ""} {puthelp "$type $nick :Syntax: $cmdsearch &lt;search string&gt;" ;return 0}     regsub -all -- " " ${arg} "*" rlsarg     puthelp "$type $nick : $rlsinfo ...Searching for '$rlsarg'"     set totrlsfound 0    set alltext ""     foreach database $cd_release {         set rlsfile [open $database r]         while {![eof $rlsfile]} {          set rlsline [gets $rlsfile]          if {[string match "*$rlsarg*" $rlsline]} {             incr totrlsfound 1             if {$totrlsfound &lt; $rlsmaxsearch} {                lappend alltext $rlsline             }          }       }       close $rlsfile     }    if {$alltext != ""} {       foreach allline [lreverse $alltext] {          puthelp "$type $nick : \002Found:\002 $allline"       }    }    if {$totrlsfound &gt; $rlsmaxsearch} {puthelp "$type $nick :There are over $rlsmaxsearch matches. Please be more specific"}    puthelp "$type $nick :There was a total of $totrlsfound entries matching your query." } </code></pre></div>search_file<br><div class="codebox"><p>Code: </p><pre><code>a b cd e f gh i j bk l b mn t b</code></pre></div>IRC test:<br><div class="codebox"><p>Code: </p><pre><code>[15:20] &lt;+dirty&gt; !search a[15:20] &lt;@BotZone&gt;   ...Searching for 'a'[15:20] &lt;@BotZone&gt;  Found: a b c[15:20] &lt;@BotZone&gt; There was a total of 1 entries matching your query.[15:20] &lt;+dirty&gt; !search b[15:20] &lt;@BotZone&gt;   ...Searching for 'b'[15:20] &lt;@BotZone&gt;  Found: n t b[15:20] &lt;@BotZone&gt;  Found: k l b m[15:20] &lt;@BotZone&gt;  Found: h i j b[15:20] &lt;@BotZone&gt;  Found: a b c[15:20] &lt;@BotZone&gt; There was a total of 4 entries matching your query.</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Thu Feb 21, 2013 9:22 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-02-21T09:03:53-04:00</updated>

		<published>2013-02-21T09:03:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101079#p101079</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101079#p101079"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101079#p101079"><![CDATA[
I restarted and it did not work<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Thu Feb 21, 2013 9:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-21T08:48:38-04:00</updated>

		<published>2013-02-21T08:48:38-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101078#p101078</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101078#p101078"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101078#p101078"><![CDATA[
BigToe did you rehash/restart your eggdrop? Aldo I did not test that I`m pretty sure it should of worked.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Thu Feb 21, 2013 8:48 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-02-21T08:36:28-04:00</updated>

		<published>2013-02-21T08:36:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101077#p101077</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101077#p101077"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101077#p101077"><![CDATA[
hey dirty, thanks for the reply - no, that did not work, it still searches from top to bottom<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Thu Feb 21, 2013 8:36 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[dirty]]></name></author>
		<updated>2013-02-21T07:51:00-04:00</updated>

		<published>2013-02-21T07:51:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101076#p101076</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101076#p101076"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101076#p101076"><![CDATA[
For BOTTOM to UP results try this one.. I haven`t tested it but should work..<br><br>Replace this:<br><div class="codebox"><p>Code: </p><pre><code>proc rlslocate {nick uhost handle type arg} {    global rlsmaxsearch cd_release rlsinfo    if {$arg == ""} {puthelp "$type $nick :Syntax: $cmdsearch &lt;search string&gt;" ;return 0}    regsub -all -- " " ${arg} "*" rlsarg    puthelp "$type $nick : $rlsinfo ...Searching for '$rlsarg'"    set totrlsfound 0    foreach database $cd_release {       set rlsfile [open $database r]       while {![eof $rlsfile]} {          set rlsline [gets $rlsfile]          if {[string match "*$rlsarg*" $rlsline]} {             incr totrlsfound 1             if {$totrlsfound &lt; $rlsmaxsearch} {                puthelp "$type $nick : \002Found:\002 $rlsline"             }          }       }       close $rlsfile    }    if {$totrlsfound &gt; $rlsmaxsearch} {puthelp "$type $nick :There are over $rlsmaxsearch matches. Please be more specific"}    puthelp "$type $nick :There was a total of $totrlsfound entries matching your query." } </code></pre></div>With this:<br><div class="codebox"><p>Code: </p><pre><code>proc rlslocate {nick uhost handle type arg} {     global rlsmaxsearch cd_release rlsinfo     if {$arg == ""} {puthelp "$type $nick :Syntax: $cmdsearch &lt;search string&gt;" ;return 0}     regsub -all -- " " ${arg} "*" rlsarg     puthelp "$type $nick : $rlsinfo ...Searching for '$rlsarg'"     set totrlsfound 0 set alltext ""    foreach database $cd_release {         set rlsfile [open $database r]         while {![eof $rlsfile]} { set rlsline [gets $rlsfile] if {[string match "*$rlsarg*" $rlsline]} { incr totrlsfound 1 if {$totrlsfound &lt; $rlsmaxsearch} { lappend alltext $rlsline } } } close $rlsfile     }if {$alltext != ""} {foreach allline [lreverse $alltext] {puthelp "$type $nick : \002Found:\002 $allline"}}   if {$totrlsfound &gt; $rlsmaxsearch} {puthelp "$type $nick :There are over $rlsmaxsearch matches. Please be more specific"}    puthelp "$type $nick :There was a total of $totrlsfound entries matching your query." } </code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12189">dirty</a> — Thu Feb 21, 2013 7:51 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[BigToe]]></name></author>
		<updated>2013-02-21T05:06:43-04:00</updated>

		<published>2013-02-21T05:06:43-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=101073#p101073</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=101073#p101073"/>
		<title type="html"><![CDATA[.tcl search in .txt file with -nocase help]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=101073#p101073"><![CDATA[
Can anyone please modify this script to search the file from BOTTOM to TOP instead of top to bottom? ie, return the top results starting from the last line to the first<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=11473">BigToe</a> — Thu Feb 21, 2013 5:06 am</p><hr />
]]></content>
	</entry>
	</feed>
