I am using a python file to scrape a link, but to do that it takes some time, it prints
33
, 66
and 100
normally and print the link to stderr using sys.write.stderr(var)
Now, I want to run this command python file.py | dialog --gauge "Doing stuffs" 10 35 0
and want to pipe the stdout(33, 66, 100 for updating percentage) to gauge and get the sterr to a variable.
{
python3 file.py 2>&3 | dialog --gauge "Doing stuffs" 10 35 0;
} 3>&1
this command runs dialog correctly and then print the stderr, but I can't take its output unless It is made to run in subshell. But doing so will make the dialog disappear.
Asked by decipher
(352 rep)
Oct 31, 2022, 04:16 PM
Last activity: Nov 1, 2022, 05:57 PM
Last activity: Nov 1, 2022, 05:57 PM