LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   lftp with progress bar in a script (http://www.linuxquestions.org/questions/linux-server-73/lftp-with-progress-bar-in-a-script-4175444506/)

bittus 01-07-2013 09:49 AM

lftp with progress bar in a script
 
I would like to see the progress of lftp download while running in a script.

Currently I am using the following in my script:

Quote:

lftp -c 'pget -n 100 http://xx:xx:xx:xx/cloud_2012/cloud_config.tar '
But this does not display the progress of download while executing thru the script.

If i execute the command manually, I'm able to see the progress as below:

Quote:

`...cloud_config.tar', got 35256440 of 35614720 (98%) 726.2K/s eta:28s
oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooooooooooooooooooooooooooooooooooooo..oooo.
I would like to see the same output while executing the command thru script. Appreciate any sort of help.

Thank you.

legolasthehansy 01-07-2013 10:33 AM

Can you try adding 2>&1 to your lftp script? This should redirect the output to the console but sure might mess up while you are in the middle of something.. You can redirect to a file instead.

bittus 01-08-2013 03:37 AM

@legolasthehansy

Thank you for the help. Appreciate . . .

Sorry to say that it did not work :(


All times are GMT -5. The time now is 07:14 PM.