Feb 22, 2012

O'reilly Linux device driver open book download script

The book Linux device drivers third edition is a free book from O'reilly. Pdfs are available for all the 18 chapters. The following script will download them all together.


Open a terminal and create a file download.sh. Add the following scripts to it.

#!/bin/bash
#comment the line which is not required to download
wget http://oreilly.com/catalog/linuxdrive3/book/TITLE.pdf
wget http://oreilly.com/catalog/linuxdrive3/book/COPYRIGHT.pdf
wget http://oreilly.com/catalog/linuxdrive3/book/ldr3TOC.fm.pdf
wget http://oreilly.com/catalog/linuxdrive3/book/AUTHOR.COLO.pdf
wget http://oreilly.com/catalog/linuxdrive3/book/biblio.pdf

# index
wget http://oreilly.com/catalog/linuxdrive3/book/ldr3IX.fm.pdf
# 18 chapters
c=0
while [ $c -le 9 ]
do
      wget http://oreilly.com/catalog/linuxdrive3/book/ch0$c.pdf
      ((c++))
done
c=10
while [ $c -le 18 ]
do

      wget http://oreilly.com/catalog/linuxdrive3/book/ch$c.pdf
      ((c++))
done
Now save it and add executable permission to the file (chmod +x download.sh)
Now ./download.sh
This will download all the chapters, index and other files in the book to the current folder.


For Web Developer

  open -a "Google Chrome" --args --disable-web-security