Sample Header Ad - 728x90

lftp whiptail progress bar

1 vote
2 answers
2782 views
I am using the following command in a bash script to download files from an ftp server. This command uses the -v option which shows the name of each file being downloaded. /usr/bin/lftp ftp://$ftpuser:$ftppass@$ftphost -e "$ftpsettings ; mirror -v -e $remotemedia $localmedia ; quit" I need to modify the script, to display a progress bar using whiptail, to show the download progress. This is the progress bar, but I don't know how to make it read the lftp download progress. { for ((i = 0 ; i <= 100 ; i+=5)); do sleep 0.1 echo $i done } | whiptail --gauge "Downloading file $name..." 6 50 0 How can I do this?
Asked by aristosv (93 rep)
Jun 2, 2016, 12:07 PM
Last activity: Jan 17, 2021, 06:53 AM