I've got a probably simple (and probably even already answered) question regarding displaying output from several scripts and at the same time writing their stout/stderr to a log file:
I have a script "my_script.sh" which itself calls another script like that:
./my_to_be_logged_script.sh 2>&1 | tee -a "$LOGFILE"
my_to_be_logged_script.sh among other operations calls a Python script and another shell script like that:
./my_to_be_logged_shell_subscript.sh
python "my_to_be_logged_py_subscript.py"
First of all, everything is logged properly to LOGFILE.
The shell script output is displayed in real-time but the console displays the output of the Python script only when the Python script has completed. Is there a way to display the Python output in real-time?