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.
Help for those learning Tcl or writing their own scripts.
-
haferbrei
- Voice
- Posts: 24
- Joined: Wed Apr 08, 2020 8:57 pm
Post
by haferbrei »
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: Select all
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?
-
haferbrei
- Voice
- Posts: 24
- Joined: Wed Apr 08, 2020 8:57 pm
Post
by haferbrei »
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: Select all
set binary {/etc/eggdrop/bashscript.sh}
putquick "PRIVMSG $chan :$pack arrives."
foreach line [split [exec $binary $pack] "\n"] {
putquick "PRIVMSG $chan :$line"
}