How can I read the output of a process that hasn't (and never will) exit/end?
Consider the following example:
using OutputCollectors
script = raw"""
declare -i i=0
while TRUE
do
i+=1
echo "Line #$i"
sleep 1
done
"""
oc = OutputCollector(`sh -c $script`)
Unsurprisingly, running tail(oc) for instance will never return.
Is there any way to retrieve the output "up to now"?