-
-
Save mattdanielbrown/45d1dee2c6da09c4519f1d1f3d007ad5 to your computer and use it in GitHub Desktop.
Revisions
-
itayd revised this gist
Dec 14, 2010 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +0,0 @@ -
itayd revised this gist
Dec 14, 2010 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ ssdsd -
itayd created this gist
Dec 12, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/bash notags() { while read line; do echo $line | sed -e "s/<[^>]*>/ /g" -e "s/ / /g" done } user=$1 wanted=$2 list=`curl -s http://gist.github.com/api/v1/xml/gists/${user}` repos=`echo $list | xmlstarlet sel -t -c "gists/gist/repo" | notags` for repo in $repos; do files=`echo $list | xmlstarlet sel -t -c "gists/gist[repo=${repo}]/files/file/file" | notags` for file in $files; do if [[ $file == $wanted ]]; then curl -s https://gist.github.com/raw/$repo/$file fi done done