Request brainwaves on progress indicator for directories copy within a loop statement
Hello to all. Glad to be on the newbie bus. I have written a ksh shell script containing a function with a "for" loop copying directories to a USB HDD. Tried to use zenity as a progress indicator but as we all know it does not render itself very effective in this regard and requires me to click "OK" after every directory. I need a progress bar that will finish only after ALL directories were successfully copied with a proper progress percentage ending at 100% after the last directory was copied. It needs to look neat and sort of professional. Anyone out there that has an idea on this? Below is the basic loop statement:
function COPY
{
for DIRCOPY in $LIST #previously defined
do
cp -r $PATH/$DIRCOPY USB_HDD
done
}
Cannot wait to hear from all the wizzards out there. Been scratching my head for a while now and cannot find any workable solution on the internet.
|