Skip to content

Instantly share code, notes, and snippets.

@malloc47
Created February 18, 2012 03:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malloc47/1857232 to your computer and use it in GitHub Desktop.
Save malloc47/1857232 to your computer and use it in GitHub Desktop.
create page of +1s
#!/bin/sh
echo "<html><head>" > page.html
echo "<script type=\"text/javascript\" src=\"https://apis.google.com/js/plusone.js\"></script>" >> page.html
echo "</head><body>" >> page.html
grep -o http[^\"\)\']* $1 | xargs -I{} echo "<g:plusone href=\"{}\"></g:plusone>" >> page.html
echo "</body></html>" >> page.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment