Created
January 7, 2017 06:27
-
-
Save rdgd/d57945e47e119ed4d49f4edb672a7440 to your computer and use it in GitHub Desktop.
Clone All GitHub Repos for User
This file contains 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 characters
#!/usr/bin/env bash | |
RES=$(curl https://api.github.com/users/rdgd/repos | grep ssh_url | awk '{ print $2}') | |
STRIPPED=${RES//"\""} | |
IFS=', ' read -r -a array <<< $STRIPPED | |
for element in "${array[@]}" | |
do | |
git clone $element | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment