bash - 如何在 bash 脚本中启动单独的 bash 脚本?
问题描述
这真的很可怕。我已经尝试了很多(如果不是全部)从 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
我将非常感谢您的帮助。谢谢。:)
解决方案
推荐阅读
- hadoop - 如何将配置单元查询输出重定向到带有空格的标题和列名的文本文件
- kubernetes - Nginx Ingress 控制器设置问题
- python - Mixin 方法 super() 调用在 PyCharm 中生成一个未解析的属性引用
- sql - 警告:使用编译错误创建的类型
- visual-studio-code - 编辑器和小地图中文件中的灰色突出显示行?
- uwp - 是否可以在 Windows 10 的开发人员模式下安装未签名的 UWP 应用?
- java - 如何在基本适配器中按下按钮时添加新项目
- angular - 对于 Angular 应用程序,我应该在哪里存储从 Auth Server 生成的 JWT 令牌?
- python - Python:用熊猫重命名列
- javascript - 如何在html中显示从firebase检索到的数据