set script_bin {/home/egg/scripts/script.sh}
set my_channel "#chan"

proc script_proc_bind_cmd {nick uhost hand chan text} {
         if {![string match *hello*world* [lrange [split $text] 0 1]]} {return}
         set text [lrange [split $text] 2 end]
         set output [exec $::script_bin [lindex $text 0]]
         putserv "PRIVMSG $::my_channel :$output"; return
}

bind pubm -|- "*hello*world*" script_proc_bind_cmd