Skip to content

Commit

Permalink
fix: removing literal newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatamutyala committed Nov 4, 2024
1 parent 6420ea7 commit 2445110
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions github-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ done
echo "Full list to be backed up: $orgs"

echo "$all_orgs" | while IFS= read -r GITHUB_ORG_TO_BACKUP; do
#remove newlines
GITHUB_ORG_TO_BACKUP=$(printf "%s" "$GITHUB_ORG_TO_BACKUP" | tr -d '\n')
#remove literal newlines
GITHUB_ORG_TO_BACKUP=$(printf "%s" "$GITHUB_ORG_TO_BACKUP" | sed 's/^\\n//; s/^[[:space:]]*//; s/[[:space:]]*$//')
echo "STARTING BACKUP OF: https://github.com/${GITHUB_ORG_TO_BACKUP}"

repos=$(gh repo list $GITHUB_ORG_TO_BACKUP -L 100000 --json nameWithOwner -q '.[].nameWithOwner')
Expand Down

0 comments on commit 2445110

Please sign in to comment.