#!/bin/bash pv repos.csv | tail -n +2 | \ while IFS=, read -r repo stars fetched commit path; do path=$(echo "$path" | tr -d '\r') source=$(echo "$repo" | cut -d/ -f1) if [ "$source" == "github.com" ]; then repo_name=$(echo "$repo" | cut -d/ -f2-) curl "https://raw.githubusercontent.com/$repo_name/$commit/$path" --silent --create-dirs -o "data/$repo/$path" sleep 1 fi done