| View previous topic :: View next topic |
| Author |
Message |
bugoff Voice
Joined: 08 Nov 2007 Posts: 1
|
Posted: Thu Nov 08, 2007 12:49 pm Post subject: Search in a file |
|
|
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 |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Thu Nov 08, 2007 4:36 pm Post subject: |
|
|
| Best way is to read the data into a list var, then use lsearch |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Nov 08, 2007 5:24 pm Post subject: |
|
|
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 |
|
 |
|