Killing Mozilla When It Hangs
update Bob informs me that I could just use killall -9 mozilla.
D'oh.
I often learn programming by starting with someone else's code and modifying or tinkering to suit my needs.
In an earlier post, I used this to kill Mozilla:
alias killmoz='pgrep moz | head -n1 | perl -e "while(<>) { chomp(\$_); print \$_ }" | xargs -0 kill -9'
It turns out that that can be done a lot more simply:
alias killmoz='pgrep moz | xargs kill -9'
According to the xargs man page, the -0 option is only used when "input filenames are terminated by a null character instead of by whitespace".
Whoops ... though I did learn some stuff in the course of making that mistake. :)
This blog is no longer active, and comments have been disabled.