So here it is:
curl URL | grep -o http.*pdf | while read pippo; do wget $pippo; done
Seems too simple, doesn't it?I don't want to digress here about how it works: if you can't understand it, read
- https://en.wikipedia.org/wiki/Template:Unix_commands
- https://en.wikipedia.org/wiki/CURL
- https://en.wikipedia.org/wiki/Pipeline_(Unix)
- what you find googling about loops in bash (for the while blah blah stuff at the end)
Actually, I didn't read the stuff above, just spotted what I needed!
No comments:
Post a Comment