|
|
|
|
|
by ralph
4777 days ago
|
|
It could be better bash, e.g. using [[ instead of [. Also, curl -s https://api.github.com/users/$2/events/public |
grep "\"gravatar_id\":" |
sed -e's/[,|"]//g' |
head -n 1 |
awk '{print $(NF)}'
can be curl -sS https://api.github.com/users/$2/events/public |
sed -n '/"gravatar_id":/!d; s/",//; s/.*"//p; q'
and so on. |
|