Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl https://secure2.linuxjournal.com/pdf/dljdownload.php -o linuxjournal.html
- cat linuxjournal.html | grep -nE "download.linuxjournal.com.*=pdf-[0-9]{3}-" | while read line; do pdf=$(echo "$line" | sed 's/^[0-9]+://' | cut -d'"' -f2); n=$(echo "$line" | cut -d':' -f1); n2=$(( n - 3 )); name=$(sed -n "${n2}p" linuxjournal.html | grep -ioE "[a-z]+.?[0-9]{4}"); wget -O "${name}.pdf" "${pdf}&action=spit"; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement