Plan 9 from Bell Labs’s /usr/web/sources/contrib/nemo/rc/bin/Del
#!/bin/rc rfork e U=`{cat /dev/user} for(i){ if (~ $i [0-9]*){ echo kill > /proc/$i/notepg } if not { ps | sed -n '/^'$U' .* '$i'$/s%[^ ]* *%~>/proc/% s% *.*%/note% s%~%echo kill%p' } }