这真的太可怕了。我已经尝试了很多(如果不是全部)各种方法从bash脚本中启动一个单独的bash脚本。
这实际上是我简化故障排除的方法:
#!/bin/bash
TITLE="Simple Script Function"
#This actually is the path to the script I want to start.
ROBUST="/GrEase (for Diasteirasein)"
function start_separate_script() {
source "$ROBUST"
}
dialog --title "$TITLE" --clear \
--yesno "You're about to start a script. \n\n Are you ready?" 11 41
return_value=$?
if [ "$return_value" = "1" ]
then
dialog --title "$TITLE" --clear \
--msgbox "You seem unsure of yourself." 11 41
exit
else
dialog --title "$TITLE" --clear \
--msgbox "If you programmed your function correctly & you can incite a separate script out of this script, then your script should now start." 11 41
start_separate_script;
#Simply does not work.
# :(
exit
fi
我非常感谢帮助。 谢谢。 :)