run this in terminal and specify a mask such as "irc" and it will kill any processess with the word "irc" in it(all wild cards accepted)
#!/usr/bin/tclsh
# note change the previous line to the location of your tclsh
catch {package require Tcl} pkgRet
if {[info exists pkgRet] && [string match "*can't find*" $pkgRet]} {puts "$pkgRet"; after 750 set done 1; vwait done; exit}
if {[llength [split $argv]] == "0"} {
puts "mpkill <*mask ?f processes to kill*>"
while {[llength [split [set a [gets stdin]]]] < 1} {
puts "mpkill <*mask ?f processes to kill*>"
set a [gets stdin]
}
set argv $a
}
set found 0
catch {exec ps -x} ToScan
foreach fpid [split $ToScan \n] {
if {[string match "$argv" $fpid] && ![string match "*$argv0*" $fpid]} {
catch {exec kill -9 [lindex $fpid 0]} ret
puts "$ret"
set found 1
}
}
if {$found == 0} {puts "No Processes found matching your mask of \"$argv\""; after 750 set done 1; vwait done; exit}