#!/usr/bin/env bash # clobberall # Repeatedly kills all processes with the given name until none remain # Usage: clobberall # # Craig Jennings if [ $# -eq 0 ]; then echo "Usage: clobberall " echo "Example: clobberall emacs" exit 1 fi process_name="$1" while sudo killall "$process_name" 2>/dev/null; do sleep 0.1 done echo "All '$process_name' processes terminated."