From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail807.carrierinternetsolutions.com ([69.49.106.17] helo=mail807.megamailservers.com) by speech.braille.uwo.ca with esmtp (Exim 3.36 #1 (Debian)) id 1I2uHJ-0007z9-00 for ; Mon, 25 Jun 2007 15:31:13 -0400 X-Authenticated-User: mvferranti.clearwire.net Received: from [192.168.123.100] (69-44-252-62.mrc.clearwire-dns.net [69.44.252.62]) (authenticated bits=0) by mail807.megamailservers.com (8.13.6.20060614/8.13.1) with ESMTP id l5PJV5Me015404 for ; Mon, 25 Jun 2007 15:31:12 -0400 Message-ID: <46801804.6050409@clearwire.net> Date: Mon, 25 Jun 2007 20:31:16 +0100 From: Gaijin User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: "Speakup is a screen review system for Linux." Subject: Re: ftp question References: <20070625062622.GA4515@localhost.localdomain> In-Reply-To: <20070625062622.GA4515@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.9 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jun 2007 19:31:13 -0000 Gregory Nowak wrote: > Say I want to get 2 files via ftp, but I want to do it in a specific > order, and I don't want file2 to start downloading until file1 is > finished downloading. This may need a little editing: #!/bin/bash for ( file in filelist.txt ) do { lynx -d ftp.wherever.com/directory/%file > ~/savedir/%file grep -i "%file" filelist.txt > filelist.tmp mv -f filelist.tmp filelist.txt } done Crap it's been a long time. Anyway, if you have a list of files you'd like to download saved to filelist.txt, you can run it in a for loop. Use the lynx dump feature to dump what you want to a file. Just point lynx at it and redirect the output to %file, which will be the file listed in filelist.txt. Then do an inverse grep on filelist.txt to remove the filename and redirect grep's output to a temp file. Then move the temp file back to filelist.txt, overwriting it, and you should be done. [Ctrl+C] will interrupt this script at any time, and resume where you left off . I'm *pretty* sure it will work. I'm just not sure I got the for command written properly. Yeah, it could really be prettied up using %1 from the command line to name filelist.txt instead. Also pointing lynx's output to a download dir would help too, but the principal idea is there. Have you considered the 'wget' command? I don't know why you're downloading files that way. Are you on a dialup connection? The only thing about the script above is it expects a specific site and directory. Considerably more work would be needed to make it a more generic script that could be used for any site, dir, and file list. Anyway, I HTH, Michael