Issue
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.
Solution
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
Answered By - superk Answer Checked By - David Goodson (WPSolving Volunteer)