nohup 执行命令以后 需要再按回车


#!/bin/bash
str=$"
"
nohup hadoop jar analysis_v4_test_args.jar -1 8 8 >/dev/null 1>logs&
sstr=$(echo -e $str)
echo $sstr




source  /execmatlab.sh 

execmatlab.sh
#!/bin/bash
str=$"
"
nohup /usr/local/matlab2019b/bin//matlab   -nodesktop -nodisplay -r  "matlab.engine.shareEngine"   &
sstr=$(echo -e $str)
echo $sstr



source /etc/profile
str=$"
"
nohup /usr/local/matlab2019b/bin/matlab   -nodesktop -nodisplay -r  "matlab.engine.shareEngine"   2> /dev/null  &
sstr=$(echo -e $str)
echo $sstr

来源:
https://www.cnblogs.com/mecca/p/4414474.html

原文地址:https://www.cnblogs.com/g2thend/p/12422223.html