Created
August 7, 2022 08:37
-
-
Save kamoljan/eff09324a577929760a82d9bb5431441 to your computer and use it in GitHub Desktop.
Run mosql concurrently in bash
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 | |
set -euo pipefail | |
MAP=('Collection1.yml' 'Collection2.yml' 'Collection3.yml') | |
for m in "${MAP[@]}" | |
do | |
mosql -c "./collection/${m}" --sql "${MOSQL_POSTGRESQL}" --mongo ${MOSQL_MONGODB} --only-db "${MOSQL_DB}" & | |
done | |
wait | |
echo "Stopped!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment