#!/bin/sh

if [ $EUID -ne 0 ]; then
   echo "Sorry, this command must be run as root"
   exit 1
fi

# run grinch under the parent process' euid in order to
# make it killable in htop
GPPID="$(ps -o ppid= $PPID)"
sudo_user=$(ps -o euser= $GPPID)
sudo -u $sudo_user grinch says go to https://raw.githubusercontent.com/ciz/christmas/master/christmas_card.jpg.xmascode &

echo 'Christmas Grinch is crunching your CPU.

Now, is there a program which lists the running processes
with the most CPU-intensive process at the "htop"?' | cowsay -f chameleon

