Skip to content

Instantly share code, notes, and snippets.

@ptantiku
Created June 7, 2014 18:23
Show Gist options
  • Save ptantiku/b7b3619f508439829135 to your computer and use it in GitHub Desktop.
Save ptantiku/b7b3619f508439829135 to your computer and use it in GitHub Desktop.
for i in {1..36}
do
curl -s http://www.etda.or.th/etda_website/category/publications.html/page:$i | \
grep -P 'content.*class="news"' | \
sed -re 's/ +//g' -e 's/^.*href="([^"]+)".*>(.*)<\/a>.*/\2\thttp:\/\/www.etda.or.th\1/'
done | tee out.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment