更新时间:2022-06-22 04:23:40
您可以使用bash的UTIL 等
一旦你使用启动流程的nohup
You can use the bash util wait
once you start the process using nohup
nohup java -jar jarfile.jar &
pid=$! # Getting the process id of the last command executed
wait $pid # Waits until the process mentioned by the pid is complete
echo "Done, execute the new command"