Update.
[scripts.git] / kill-unused-xterms.sh
index 6ea3058..21258ba 100755 (executable)
@@ -28,7 +28,7 @@ SHELL_NAME=bash
 for ppid in $(ps h -C xterm -o pid); do
     N=0
     for pid in $(ps h --ppid $ppid -o pid,cmd | awk '{ if($2 == "'${SHELL_NAME}'") { print $1 }}'); do
-        K=$(ps h --ppid $pid -o cmd,pid | wc -l)
+        K=$(ps h --ppid $pid -o pid | wc -l)
         N=$((N+K+1))
     done
     if [[ $N == 1 ]]; then