Quote:
Originally Posted by zbe
the file I'm passing to my script is a list of urls, each on it's own line.
|
Uh, sorry... I was thinking at somefile as the actual file to download.
Quote:
Originally Posted by zbe
'cat $1' and '$@' aren't working for looping through them. Do you know what I could use?
|
You can try something like
Code:
#!/bin/bash
while read url
do
echo "$url"
done < somefile
substitute the echo command with the actual wget command. This is just to check if the file is correctly read.
Just an advice: don't accept downloaded scripts "as is" without knowing what they really do. Nor accept suggestions (mine included) without verifying the presence of erroneous or malicious commands. A quick look at the man pages or at the
Advanced Bash Scripting Guide should be enough to prevent (intentional or not intentional) damage to your system.