Last active
October 31, 2022 11:07
-
-
Save likewinter/d95357651e7be0396cc33a9457e41167 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
START_ID=2935172 | |
LIMIT=1000 | |
COMMAND=$1 | |
PARALLEL=$2 | |
TOTAL=$(( (PARALLEL - 1) * LIMIT )) | |
function gen() { | |
for offset in $(seq 0 $LIMIT $TOTAL); do | |
echo "$COMMAND $START_ID $offset $LIMIT > ./logs/$offset.log"; | |
done | |
} | |
gen | xargs -L 1 -P "$PARALLEL" -I {} sh -c "{}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment