Skip to content

Instantly share code, notes, and snippets.

@nyxcharon
Last active December 18, 2015 09:09
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 nyxcharon/5759599 to your computer and use it in GitHub Desktop.
Save nyxcharon/5759599 to your computer and use it in GitHub Desktop.
Grab github api value via bash
#!/bin/bash
function jsonval
{
echo `curl -s -X GET https://api.github.com/users/adonislinux/repos | grep $prop | awk '{ sub(/\"'''$prop'''\": /, ""); print}' | tr \", " "`
}
prop="ssh_url"
urls=`jsonval`
for url in $urls ; do
echo $url
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment