如何防止BASH脚本退出?
我正在尝试通过向自己发送随机公共地址来增强ngrok http 80
:
ngrok "$@" &
sendurl()
fg
不幸的是,尽管ngrok屏幕返回在线,但我在bash脚本结束时得到了一个提示,就像终止一样。
如何使Ngrok在终端“ TAB”中运行,就好像我自己启动了吗?
I am trying to augment ngrok http 80
by sending myself the random public address:
ngrok "$@" &
sendurl()
fg
Unfortunately, albeit ngrok screen comes back online, I get a prompt at the end of my bash script, like it terminated.
How do I keep ngrok running in the terminal "tab" as if I started it myself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这有点黑客,但是您可以使用子壳和小睡眠延迟来获得所需的功能。
This is a bit of a hack but you can use a subshell and a minor sleep delay to get the desired functionality.
将其放在脚本的末尾
Put this at the end of your script