| View previous topic :: View next topic |
| Author |
Message |
l.kleijn Voice
Joined: 18 May 2014 Posts: 33
|
Posted: Sat Oct 21, 2017 9:45 am Post subject: remove line in txt |
|
|
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 ? |
|
| Back to top |
|
 |
willyw Revered One
Joined: 15 Jan 2009 Posts: 1175
|
Posted: Sat Oct 21, 2017 11:42 am Post subject: Re: remove line in txt |
|
|
| 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 ! |
|
| Back to top |
|
 |
l.kleijn Voice
Joined: 18 May 2014 Posts: 33
|
Posted: Sat Oct 21, 2017 5:43 pm Post subject: |
|
|
| Quote: | 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: | 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 |
|
| Back to top |
|
 |
|