[geeks] ksh for loop question

Gregory Leblanc gleblanc at linuxweasel.com
Fri May 10 11:12:09 CDT 2002


On Fri, 2002-05-10 at 08:54, Brian Hechinger wrote:
> ok, i have a list of files that unfortunately have spaces in them.  i'd like
> to get this list of files from a server using wget, so i was looking to just
> use a for loop to go and get them all, for example:
> 
> for files in `cat file_list.txt`; do
>   wget "http://www.server.com/$files"
> done
> 
> this of course fails misserably since for splits by whitespace.  how do i do
> something like this, but split by line not by whitespace?  and please don't
> say perl.

Rats, and I already have the perl written for this task...
	Greg

-- 
Portland, Oregon, USA.



More information about the geeks mailing list