X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=kill-unused-xterms.sh;fp=kill-unused-xterms.sh;h=8100b6b44b3791d159216bf5a86168e43ad24ad7;hp=075b2ba1acb948cfa2f688537476ae30ac60b4a3;hb=0459598c9b7568cf1304d938585fe3dda5d84c3d;hpb=ff3c51b5ab68a4f719e2eed9a32422ebbd56d857 diff --git a/kill-unused-xterms.sh b/kill-unused-xterms.sh index 075b2ba..8100b6b 100755 --- a/kill-unused-xterms.sh +++ b/kill-unused-xterms.sh @@ -21,12 +21,15 @@ set -e +TERMINAL_APP=xterm +[[ "${TERMINAL_APP}" ]] || TERMINAL_APP=xterm + NB_KILLED=0 NB_TOTAL=0 SHELL_NAME=$(basename ${SHELL}) # Loop through the pid of xterms -for ppid in $(ps h -C xterm -o pid); do +for ppid in $(ps h -C "${TERMINAL_APP}" -o pid); do N=0