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.

remove line in txt

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
l
l.kleijn
Voice
Posts: 33
Joined: Sun May 18, 2014 10:02 am

remove line in txt

Post by l.kleijn »

Hello,

Is it possible to remove 1 line in a txt file ?

With the name Fujin, or something like that.

Can you show me how ?
w
willyw
Revered One
Posts: 1197
Joined: Thu Jan 15, 2009 12:55 am

Re: remove line in txt

Post by willyw »

l.kleijn wrote:Hello,

Is it possible to remove 1 line in a txt file ?
...
If you know some TCL, then the info found here might help:
http://forum.egghelp.org/viewtopic.php?t=6885
and scroll down to : 3. Deleting a line from a text file.

If you don't know enough TCL for that to get you started, then it would help
if you posted an example of the file that you want to edit.
For a fun (and popular) Trivia game, visit us at: irc.librairc.net #science-fiction . Over 300K Q & A to play in BogusTrivia !
l
l.kleijn
Voice
Posts: 33
Joined: Sun May 18, 2014 10:02 am

Post by l.kleijn »

If you know some TCL, then the info found here might help:
http://forum.egghelp.org/viewtopic.php?t=6885
and scroll down to : 3. Deleting a line from a text file.

If you don't know enough TCL for that to get you started, then it would help
if you posted an example of the file that you want to edit.
It worked. Thanks.

I have another question.

Code: Select all

bind pub - ${trigger}pay pub:pay

proc pub:pay {nick host hand chan arg} {
  global botnick fname pricetopic
  set product [lindex $arg 0]  
  set topic [lindex $arg 1 end]
  if {$product == "topic"} {
     set searchstring $arg   
     set fp [open $fname "r"]
     set data [read -nonewline $fp]
     close $fp
     if {$pricetopic > 10} {
        putserv "NOTICE $nick :U hebt te weinig geld."
        return 0
     }
  } else { putserv "TOPIC $chan :$topic" }
}
i would like to have a script that reads that 10 from or higher.
and that it after it's 10 or more change the topic
Post Reply