Well, one way is to:
Code:
echo "-1" > /dev/shm/aRC
echo "-1" > /dev/shm/bRC
(a.sh; echo "$?" > /dev/shm/aRC) &
(b.sh; echo "$?" > /dev/shm/bRC) &
wait
if [ "`/bin/cat /dev/shm/aRC`" == "0" ] && [ "`/bin/cat /dev/shm/bRC`" == "0" ]
then
c.sh
fi
/bin/rm -f /dev/shm/aRC /dev/shm/bRC
Note the '/dev/shm' is a kernel provided shared memory filesystem. You may not have it available, depending on your release or distribution. You can just use disk files in that case.
I'm sure others will chime in with 100 additional ways to accomplish the same thing.