I'm running a script on a remote machine like this:
ssh $host "pip install -r /path/to/requirements.txt"
But the output isn't line buffered; instead of seeing one line returned at a time, all the lines (~10) are all printed at once as the connection terminates.
What's up with this? Is there any way to force them to be line buffered?
(also, to state the obvious: when I ssh into
$host and run the command “manually”, the output is line buffered, as expected)