Linux shell脚本运行多个shell脚本选项卡
我想制作一个在新选项卡/窗口中运行多个其他 .sh 的 .sh 。
类似 main.sh 内部的东西
"sh1.sh"
wait 5 seconds to load
"sh2.sh"
wait 5 seconds
"sh3.sh"
I would like to make a .sh that runs multiple other ones .sh in new tabs/windows.
something like inside main.sh
"sh1.sh"
wait 5 seconds to load
"sh2.sh"
wait 5 seconds
"sh3.sh"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以尝试 xterm -e ~/sh1.sh 作为命令。不过,一旦脚本完成,它就会关闭。
You could try xterm -e ~/sh1.sh as your command. It'll close as soon as the script has finished though.
如果您需要同时在单独的窗口中运行它们,则需要将每个进程置于后台。
这可能应该重构为使用循环和/或包装函数。
If you need to run them in separate windows simultaneously, you need to background each process.
This should probably be refactored to use a loop and/or a wrapper function.