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 

remove line in txt

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
l.kleijn
Voice


Joined: 18 May 2014
Posts: 7

PostPosted: Sat Oct 21, 2017 9:45 am    Post subject: remove line in txt Reply with quote

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
View user's profile Send private message
willyw
Owner


Joined: 15 Jan 2009
Posts: 925

PostPosted: Sat Oct 21, 2017 11:42 am    Post subject: Re: remove line in txt Reply with quote

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
View user's profile Send private message
l.kleijn
Voice


Joined: 18 May 2014
Posts: 7

PostPosted: Sat Oct 21, 2017 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests 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