This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Search in a file

Help for those learning Tcl or writing their own scripts.
Post Reply
b
bugoff
Voice
Posts: 1
Joined: Thu Nov 08, 2007 11:52 am

Search in a file

Post by bugoff »

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?
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

Best way is to read the data into a list var, then use lsearch
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

There are a lot of topics about reading and manipulating files. Use the search function.
Post Reply