I want a run a long task on a remote machine (with python fabric using ssh). It logs to a file on the remote machine. What I want to do is to run that script and tail (actively display) the log file content until the script execution ends. The problem with
python test.py & tail -f /tmp/out
is that it does not terminate when test.py exits. Is there a simple linux trick I can use to do this or do I have to make a sophisticated script to continuously check the termination of the first process?