开发者

Threading a shell script

I have a small shell script that executes ~30 Java commands consecutively. Each one pulls data from a MySQL db then j开发者_StackOverflow中文版ams it into a BI tool. Is there any way to execute >1 of these commands from within said shell script? Unfortunately, I only have access to the script itself, I cannot change the frequency or method of execution.

THANKS


Generally, a construct like this:

command_1 &
command_2 &
command_3 &
# ...

wait

will run all of the commands with & at the end in parallel, and then wait for all of them to finish before continuing. Without knowing more about what these commands look like, I can't be more specific.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜