This is very weird that "tee" is not working for the python scripts. I have a program called "test.py" and trying to output to the terminal and to a log file using shell commands. I have tried
$python test.py | tee -a result.txt
$python test.py | tee result.txt
$python test.py | >> result.txt
$ (python test.py) | tee -a result.txt
It just does not work. I do not want to change anything in my program cause there are more than 200 print statements.
Thanks in advance.