执行bash脚本秩序 [英] bash script order of execution

查看:120
本文介绍了执行bash脚本秩序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不要在bash脚本行顺序执行?我看不出有任何理由为什么不呢,但我真正的新的bash脚本和我有需要,以执行一对夫妇的命令。

例如:

 #!/ bin / sh的
#将在获得下一个命令启动前完成?
./someLongCommand1 ARG1
./someLongCommand2 ARG1


解决方案

是的......除非你走出自己的方式在后台运行的一个命令,一会下一个开始前完成。

Do lines in a bash script execute sequentially? I can't see any reason why not, but I am really new to bash scripting and I have a couple commands that need to execute in order.

For example:

#!/bin/sh
# will this get finished before the next command starts?
./someLongCommand1 arg1
./someLongCommand2 arg1

解决方案

Yes... unless you go out of your way to run one of the commands in the background, one will finish before the next one starts.

这篇关于执行bash脚本秩序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆