#!/bin/sh # zombies - list all zombies and their parents to kill ps -eo state,pid,ppid,comm | awk ' { cmds[$2] = $NF } /^Z/ { print $NF "/" $2 " zombie child of " cmds[$3] "/" $3 }'