From: https://gist.github.com/cjus/1047794
Replace YOURLS/YOURLS
with your own [org/user]/repo
#!/bin/bash | |
json=`curl -s -X GET https://api.github.com/repos/YOURLS/YOURLS/tags` | |
prop='name' | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo $temp | cut -d\ -f3 |
From: https://gist.github.com/cjus/1047794
Replace YOURLS/YOURLS
with your own [org/user]/repo