I'm using this bash
& jq
script:
UserName=CHANGEME;
curl -s https://api.github.com/users/$UserName/repos?per_page=1000 |
jq -r '.[]|.clone_url' |
xargs -L1 git clone
It will clone the repos into a directory using the REST API parameter name
(repo.name). (Default behavior)
I want it to clone the repos into a directory using the REST API parameter full_name
(since it consists of repo.owner
and repo.name
), how do I get around to do that?
This is what is created inside my directory:
repo.name1
repo.name2
This is what I want inside my directory:
repo.owner1
epo.name1
repo.owner2
epo.name2
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…