foo.shとbar.shを実行して、
% ls bar.sh foo.sh % ./foo.sh & % ./bar.sh & % jobs [1] - running ./foo.sh [2] + running ./bar.sh
kill す。
% ps -ef|perl -lane '/(foo|bar)\.sh/ and kill(SIGKILL, $F[1])' [1] - killed ./foo.sh [2] + killed ./bar.sh
- foo.sh、bar.sh
#!/bin/bash while : do echo $0 sleep 60 done