egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search in a file

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
bugoff
Voice


Joined: 08 Nov 2007
Posts: 1

PostPosted: Thu Nov 08, 2007 12:49 pm    Post subject: Search in a file Reply with quote

I'm currently trying to write a script that searches true a file.

I can open the file, but then i'm stuck.

My file looks like this:

BuGoFf bugoff@353453.myhost.be
Bugz0r bugz0r@656598.bugz0r.net

Whats the best way to search for the nick (or in this file: BuGoFf) in the file?
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Thu Nov 08, 2007 4:36 pm    Post subject: Reply with quote

Best way is to read the data into a list var, then use lsearch
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Nov 08, 2007 5:24 pm    Post subject: Reply with quote

There are a lot of topics about reading and manipulating files. Use the search function.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber