Try this:
$ echo 'echo hello; sleep 2' >/tmp/hm.sh; bash /tmp/hm.sh & (sleep 1; echo 'ls /bin' >>/tmp/hm.sh); sleep 3
Try this: