I tried to use a zenity progress bar with cclive. I'm writting a script to download web videos files and I wanna see the progression of the download.
But when I try something like
$cclive <url> 2>&1 | zenity --progress
But when I execute the command line but it not seems to work. Any idea of how I can do that ?
BR,
[Edit]
cclive have this kind of output :
cclive http://www.youtube.com/watch?v=youtubevideo
Checking ... .......... ..........done.
youtubevideo.flv 2.5M 75.8K/s 00:09:29 5%
So I need to send the last part to sdout but I dont know how. Else and about pulsate, we can't see th progression with this option, and I really need it... So I will not using pulsate for this script.
think that the paste | zenity --progress after commands - will not work.
You know that it's loaded only at the end of downloading.
I try to use zenity with --percentage parameter, and i know the best way to check state of process.
In my script I know size of file.
size_t=$theoretical_size_of file # I don't know where are from you take FULL size of your file. I know it in myself script.
size_r=`du -b /tmp/$filename`
perc=$[$size_t/$size_r*100]
Where should i write zenity --progress --percentage=$perc
AND i think that it should be a loop, cause du -b continiously changing...