I know how to run a script in daemon mode (add a & to it):
mycmd -y config.yaml run&
However, the script I’m running has lots of “print” statements, which ruin my output. Is there a way to say “output this to log.txt”?
This didn’t work:
mycmd -y config.yaml run& >> log.txt
Hmm…
Another way to do it:
mycmd -y config.yaml run >> log.txt 2>&1 &The
2>&1mergesstderrintostdoutso that everything goes intolog.txt.