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 

Output to channel

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
haferbrei
Voice


Joined: 08 Apr 2020
Posts: 23

PostPosted: Mon Mar 08, 2021 7:36 pm    Post subject: Output to channel Reply with quote

How can I output the intermediate output directly from a script?
Currently it is only output after the script has finished.

Actually i call a shell script to execute a lot of things.
Code:

set binary {./script.sh}
foreach line [split [exec $binary $pack $pack2 $nick] "\n"] {
      putquick "PRIVMSG $chan :$line"
 }
}

my idea would be to split the shell script into x scripts and call them one after the other.
is it also possible to do it more elegantly?
Back to top
View user's profile Send private message
haferbrei
Voice


Joined: 08 Apr 2020
Posts: 23

PostPosted: Fri Apr 16, 2021 10:24 pm    Post subject: Reply with quote

How can I putquick "PRIVMSG $chan :$pack arrives." in the channel before exec is executed?
currently it is not output until exec is done.



Code:

set binary {/etc/eggdrop/bashscript.sh}

putquick "PRIVMSG $chan :$pack arrives."

        foreach line [split [exec $binary $pack] "\n"] {
            putquick "PRIVMSG $chan :$line"
        }
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 -> Scripting Help 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