Hello,
I'm writing a script that is meant to be run on a mounted CD. At the end of the script, I want to run another script which will be located on the local disk.
This secondary script will perform a few tasks in addition to ejecting the aforementioned CD, but will require user input. The problem I can't figure out is after the first script exits, control of the shell is given up and the second script fails because it is unable to read from STDIN.
How can I transfer control of the terminal to the second script?
Thanks,
kb
/media/cdrom/script-on-cd.sh
Code:
#!/bin/bash
echo "I'm on a CD"
/tmp/script-on-disk.sh &
/tmp/script-on-disk.sh
Code:
#!/bin/bash
echo "I'm on the local disk!"
sleep 10
eject
echo "Ejected!"
echo "More food please. Press enter when you're ready"
read CONTINUE
echo "Thanks!"