duckduckget.shon commit remove junk (20ca5d6)
   1#! /bin/bash
   2
   3# get urls from duckduckgo, then parse them to wget to download
   4
   5args=("$@")
   6search=${args[0]}
   7filetype=${args[1]}
   8
   9set -f
  10urls=`curl -silent https://duckduckgo.com/html/\?q\=site:www.mash.dept.shef.ac.uk/Resources | 
  11grep 'pdf$' | tr -d ' \t\r' | grep -v '^[0-9]' | awk '{print "http://" $0}'`
  12
  13for url in $urls; do
  14        wget --cut-dirs=100 -P /mnt/andrew/literature/mathcentre/ $url
  15done