9 lines
285 B
Bash
Executable file
9 lines
285 B
Bash
Executable file
#!/bin/bash
|
|
|
|
GHUSER="${1:-$USER}"
|
|
NBPAGES="${2:-1}"
|
|
|
|
for page in $(seq 1 $NBPAGES); do
|
|
echo "Retrieving page $page" >&2
|
|
curl "https://api.github.com/users/$GHUSER/repos?page=${page}&per_page=100" | grep '"ssh_url":' | perl -pe 's#^\s*"ssh_url": "([^"]*)".*$#$1#'
|
|
done > repos-urls
|