문제

I want to run

python argument1.txt argument2.txt >logfile.log

with nohup, but I get no output because it is redirecting the input to null. I want it to accept command line arguments at first and do work in nohup way.

nohup python argument1.txt argument2.txt >logfile.log

when I run the above command i get the following output. nohup: ignoring input and appending ... which means areguments are being ignored. on the manual it says i have to do some input redirection, which i dont know how to.

도움이 되었습니까?

해결책

nohup redirects to nohup.out

If you wish to get the nohup look and feel and redirect to another file(s) do this:

( python argument1.txt argument2.txt >logfile.log 2>logfile.err & ) &

This doesn't hang up when you log out. (you can redirect stderr to the same log file by replacing 2>logfile.err for 2>&1

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top