Created
March 16, 2017 04:58
-
-
Save Daniel-M/aed1edd316434612c589a178673d20a5 to your computer and use it in GitHub Desktop.
Generates a script to clone all the public repositories from a given 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
user="" | |
script="clone_github_"$user"_public_repos.sh" | |
curl -i https://api.github.com/users/$user/repos | awk 'index($line,"ssh_url") { print $line}' | sed '{s/"//g;s/,$//g;s/ *ssh_url\:/git clone/}' > $script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment