Skip to content

Instantly share code, notes, and snippets.

@munshkr
Last active December 19, 2015 10:58
Show Gist options
  • Save munshkr/5943853 to your computer and use it in GitHub Desktop.
Save munshkr/5943853 to your computer and use it in GitHub Desktop.
Bash script for downloading all chapters from the book "The Scientist and Engineer's Guide to Digital Signal Processing" by Steven W. Smith, and merging them into a single PDF file. http://www.dspguide.com/
#!/bin/bash
# Download all chapters from the book "The Scientist and Engineer's Guide to
# Digital Signal Processing" by Steven W. Smith, and merge them into a single
# PDF file.
#
# Requirements: wget, pdftk
baseurl="http://www.dspguide.com"
tmpdir="/tmp"
mergefile="dspguide.pdf"
for i in {1..34}
do
wget $baseurl/CH$i.PDF -O $tmpdir/dspguide_`printf %02d $i`.pdf
done
pdftk $tmpdir/dspguide_*.pdf cat output $mergefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment