当我用我的主要文字执行另一个文字时:
#!/bin/bash
if cond1; then
stuff
sleep 10
./script1.sh &
elif cond2; then
more stuff
./script2.sh &
else
echo "foo"
fi
stuff
echo "Hello World"
script1.sh & script2.sh do no seem to exit until I close the main script even though I have issued the exit command inside the script1 & script2. Am I missing something? Any input would be greatly appreciated.