Skip to content

Instantly share code, notes, and snippets.

@i8degrees
Created April 22, 2012 10:26
Show Gist options
  • Select an option

  • Save i8degrees/2463349 to your computer and use it in GitHub Desktop.

Select an option

Save i8degrees/2463349 to your computer and use it in GitHub Desktop.
GitHub Feed for i8degrees
#!/bin/sh
#
# Github Feed for i8degrees
#
URL="https://github.com/i8degrees.atom"
if [ $# -eq 1 ] ; then
headarg=$(( $1 * 2 ))
else
headarg="-8"
fi
curl --silent "$URL" | grep -E '(title>)' | \
sed -n '4,$p' | \
sed -e 's/<title>//' -e 's/<\/title>//' | \
sed -e 's/<!\[CDATA\[//g' |
sed -e 's/\]\]>//g' |
sed -e 's/<[^>]*>//g' |
head $headarg | sed G | fmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment