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


[ view entry ] ( 1268 views )   |  print article

<<First <Back | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Next> Last>>



2024 By Angel Cool