乳宁脚本在后台HERE_DOC方法 [英] Runing script with HERE_DOC method in background
本文介绍了乳宁脚本在后台HERE_DOC方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我应该在后台运行的脚本。我必须尽快回答的问题,因为我运行bash..How我能做到这一点?
(nohup的蟒蛇script.py善堂'<<这里是这里'和;)
解决方案
的<<
定界符是多行,像
somescript<<&EOF放大器;
输入
EOF
在定界符定界符应该是单独在最后一行
您可以使用一个行定界符与<<<
,如:
somescript<<<这从标准输入设备来了&放大器;
I have a script that should be run in background. I must answer a question as soon as I run the bash..How can I do that?
(nohup python script.py lst '<<HERE yes HERE' &)
解决方案
The <<
heredoc is multiline, like
somescript <<EOF &
input
EOF
the heredoc delimiter should be alone on the final line
You can use one line heredoc with <<<
, like:
somescript <<<"this coming from stdin" &
这篇关于乳宁脚本在后台HERE_DOC方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文