#!/bin/sh
(sleep 5; echo "good bye from child 1") &
(sleep 10; echo "good bye from child 2") &
wait
echo "good bye from parent process"
When executed, this script will output:
good bye from child 1
good bye from child 2
good bye from parent process
Arggg, so many lost hours writing custom code to do what was only one line away.