pipe output of do-release-upgrade to file


Answer: 1

28 hours ago

I'm trying to pipe the output of the do-release-upgrade command to a file in real time. It is a python script and for some reason I can't make it show the output printed to the terminal normally to a file. I tried different approaches like

python3 -u /usr/bin/do-release-upgrade -f DistUpgradeViewNonInteractive --allow-third-party > status.txt


script -c "/usr/bin/do-release-upgrade -f DistUpgradeViewNonInteractive --allow-third-party" status.txt

or just

do-release-upgrade -f DistUpgradeViewNonInteractive --allow-third-party > status.txt

and ofc.

do-release-upgrade -f DistUpgradeViewNonInteractive --allow-third-party | tee status.txt

I also tried different tee options like 2>&1 and I tried to set the buffer with stdbuf -o0, but none of those worked.

Is there anything special with this python script that piping doesn't work easily here?

Added by: Blanche Friesen

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9