I have the following:
- main.py python script which while running writes to main.log.
- I am writing a sh file.
I want to execute the python script from sh file and to see in the terminal window all the log which is written to the main.log file while executing.
Currently I am doing it by open a terminal and execute the script and open another terminal and writing
tail -f main.log.
Thanks.
&after the command you use for launching your python script to launch it as a background process. Then, you cantail -fin the same terminal.python main.py | tee main.log.