nohup VERBOSE=1 perl script.pl

浪尽此生 提交于 2019-11-30 17:24:11

Set the environment variable before calling nohup, and it will be preserved when nohup exec()s (replaces itself with) perl.

$ VERBOSE=1 nohup perl myscript.pl params ...

This is exactly what the env command is for:

$ env VAR1=VAL1 VAR2=VAL2 nohup perl myperlscript.pl params &

Try to combine all commands into shell script and run it like that: nohup /path/to/script.sh

Or you could use export: export VERBOSE=1 And then: nohup perl myperlscript.pl params

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!