Menu

24 November 2010

download all pdf from a url using bash

Add this function to your bashrc and from command line you will be
able to download all pdf

downloadallpdf() {
for i in $(lynx -dump $1 | sed -ne '/ http/,//p' | grep -F .pdf |
grep -o http.* | sort -u); do wget -c $i; done
}

Ex -

$downloadallpdf http://en.wikipedia.org/wiki/Free_software
Will download the pdf given at the above page.

If you know any better solution then post here !!

PS:This command is added in schoolos now. Post me other usability tip
so that we can improve linux

By- Narendra Sisodiya

No comments: