BASH: Looping through all lines in a file 
Content of getThem.sh :
cd logos;

while read line; do

# test if line starts with "assets"
if [[ $line =~ ^asset.* ]]; then
#prepend domain
line="http://www.soy-example.com/$line"
fi

# test if line starts with "/assets"
if [[ $line =~ ^/asset.* ]]; then
# prepend domain
line="http://www.soy-example.com$line"
fi

# download this sucker
wget $line

done < ../soyFranquiciasLogos.txt


Comments
Comments are not available for this entry.
2024 By Angel Cool