在Unix中完成以前的脚本后如何运行多个脚本和其他脚本

时间:2019-11-17 15:23:44

标签: shell unix parallel-processing

我必须运行带有参数的脚本,并在完成参数后再次在Unix中启动另外两个脚本。您能给我一些示例代码吗,对设计很有帮助。

我曾想这样做:

function(parameter) {
   echo "script starting"
   nohup $parameter &
   sleep 1
   echo "script started"
}

function script_sample.sh $1 $2 $3
function script_sample.sh $2 $4
function script_sample.sh $1 $4 $5

wait (wait command to wait for above script to complete)

# after above, i have to initiate below scripts

function script_sample.sh $2 $3
function script_sample.sh $1 $2 $3
function script_sample.sh $2 $3 $4

wait

... (continuation of code)

任何其他想法将不胜感激并且有帮助吗?

谢谢

0 个答案:

没有答案