#!/bin/bash

# exit this script if any error occurs
set -e

# kill processes if they already exist
pkill -u $UID -f "^(kill_me|do_not_kill_me)" > /dev/null && echo "killed old processes"

# start processes
bash -c 'exec -a kill_me sleep 1000000' &
bash -c 'exec -a do_not_kill_me sleep 1000000' &

# exit the script with zero exit code
exit 0
