Skip to content

Instantly share code, notes, and snippets.

@KyMidd
Created April 17, 2023 19:44
Show Gist options
  • Save KyMidd/e72effe6696ae4d804b5319839d0a446 to your computer and use it in GitHub Desktop.
Save KyMidd/e72effe6696ae4d804b5319839d0a446 to your computer and use it in GitHub Desktop.
# Select shard to work - minus one since `split` starts counting at 0
SHARD_TO_WORK_ON=$(("$SHARD_NUMBER" - 1))
# Read in the ALL_REPOS variable based on created shard file
ALL_REPOS=$(cat all_repos_0${SHARD_TO_WORK_ON})
# Count the repos
ALL_REPOS_COUNT=$(echo "$ALL_REPOS" | awk 'NF' | wc -l | xargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment