#get the Book page by isbn with curl curl -s -A Mozilla http://books.google.com/books?vid=ISBN$1|grep -o Bibliographic\ information.*EndNote > /home/ninonino/.org/books/book_tmp.html && #wait sleep 1 && #do some inefficient cleaning awk -F'>' '{for(i=1;i<=NF;i++) printf "%s>\n", $i}' /home/ninonino/.org/books/book_tmp.html > /home/ninonino/.org/books/clean.html && #parse the page,searching for the relevant data grep -A 1 'ltr' /home/ninonino/.org/books/clean.html|grep -o .*\<\/ > /home/ninonino/.org/books/info.txt && #wait sleep 1 && #clean up the files used as temp(I said,it's inefficient) rm /home/ninonino/.org/books/clean.html /home/ninonino/.org/books/book_tmp.html && #some more cleaning awk -F' /home/ninonino/.org/books/book.txt && rm /home/ninonino/.org/books/info.txt