#!/bin/sh #while true; do # if [ "`/bin/procps -o ppid -p $$ --no-heading | /bin/awk '{print $1}'`" = "1" ]; then # exit # fi echo foo sleep 10 #done