[geeks] ksh for loop question

Brian Hechinger wonko at 4amlunch.net
Fri May 10 10:54:33 CDT 2002


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.

thanks!

-brian
-- 
Whoops, nevermind...  the compile just imploded, crashing the xterm it was
running in as well...  Thanks, Richard...              -- George Adkins --



More information about the geeks mailing list