Nice, that works. I was wondering if there was a piped command that would do the trick but it didn't cross my mind to think of this.

- Ken

Alexander V. Lukyanov wrote:

On Wed, Sep 07, 2005 at 12:16:10PM -0400, Ken Garland wrote:
#!/bin/bash
for file in `cat download`; do
 lftp -u <user>,<pass> <host> -e 'get $file; exit';
done

Which would take a considerable amount of time with a long list of files instead of using one instance of lftp to download multiple files.

Why not use this:
        sed 's/^/get /' download | lftp -u <user>,<pass> <host>

This would only work if the file names do not contain spaces and other
special characters and do not start with a minus sign. If they do, more sed
magic would be required, but it is possible.


Reply via email to