我必须运行带有参数的脚本,并在完成参数后再次在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)
任何其他想法将不胜感激并且有帮助吗?
谢谢