Comment by pona-a

Comment by pona-a 3 hours ago

0 replies

Bash has a built-in RANDOM.

  while true; do 
    kill -9 $RANDOM
    sleep 5
  done
Or to kill running running PIDs each time

  while true; do 
    rnd=$(ps -e -o pid= | shuf -n 1)
    kill -9 $rnd
    sleep 5
  done