Vote count:
0
There is a textfile in which the 1st line is link
, the 2nd is username
, and the 3rd is gallery
:
http://ift.tt/1v2ylwm 1-username gallery 1 http://ift.tt/1tDHb5h 2-username gallery 2 http://ift.tt/1v2ylwo 1-username gallery 3
For each link
need to curl
it, grep
some image's links and download them using wget
to folder named like gallery
inside the folder named like username
. For example, need to have such folder's structure:
\1-username\gallery 1 \2-username\gallery 2 \1-username\gallery 3
frame of code (used 2 backquotes for sed
output variable):
| curl $link | egrep 'PATTERN' | for image in ``sed -e "s/PATTERN/\\1/"`` do wget $image -P "\\$username\\$gallery";done
How to set different variables for strings in such textfile?
asked 24 secs ago
Put strings from text to different variables in bash
Aucun commentaire:
Enregistrer un commentaire