#!/bin/sh
echo here
while : ; do
sleep 2
echo still here
done &
main=$!
echo "# main is $main" >&2
# livinfree's neat dd trick from that other thread vino pointed out
tput smso
echo "Press any key to return \c"
tput rmso
oldstty=`stty -g`
stty -icanon -echo min 1 time 0
dd bs=1 count=1 >/dev/null 2>&1
stty "$oldstty"
echo
kill $main