2

If you run the following:

func() {
sleep 0.3
}
export -f func
percent1=0
for n in {1..4} ; do
    seq 30 | parallel -j 5 --bar func {} 2> >(yad --width=500 --progress --auto-close)
    let percent1+=25
    echo "1:$percent1"
done |
yad \
--height=300 \
--multi-progress \
--auto-close \
--bar="Bar 1 :":NORM \
--bar="Bar 2 :":NORM

2 windows will appear:

  • The first one stays open and contains 2 progress bars. "Bar 1" shows the progress of the "for" loop and "Bar 2" does nothing.
  • The other window keeps closing and reopening and shows the progress of the GNU parallel process that re-runs at each iteration of the "for" loop.

What I want is, instead of having 2 windows, to redirect the second progress into the "Bar 2" of the first window so that I only have one window that stays open and nothing popping in and out repeatedly.

I've searched and tried for hours and would love some pointers.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.