Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- wget "https://blogs.msdn.microsoft.com/mssmallbiz/2017/07/11/largest-free-microsoft-ebook-giveaway-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepo/"
- my_title_str='<td valign=".*" width=".*"><font size=".*" face=".*">\([^<]*\)</font></td>'
- my_address_str='<td width=".*"><a href="\(http://[^"]*\)" target="_blank"><font size=".*" face=".*">PDF</font></a>.*'
- files=$(grep -B 1 "$my_address_str" index.html)
- while true
- do
- read line1 || break
- title=$(echo "$line1" | sed 's,'"$my_title_str"',\1,')
- read line2 || break
- address=$(echo "$line2" | sed 's,'"$my_address_str"',\1,')
- echo "$title"
- echo "$address"
- wget "$address" -O "$title"".pdf"
- read line3 || break #--
- done <<< "$(echo -e "$files")"
Advertisement
Add Comment
Please, Sign In to add comment