This directory contains the compare_batches.sh script for comparing batch data between two domains.
To use the compare_batches.sh script:
-
Make the script executable:
chmod +x compare_batches.sh
-
Run it with two domain names:
./compare_batches.sh localhost:1633 other_domain
The compare_batches.sh script:
- Checks for correct number of arguments (requires exactly 2 domain names)
- Uses
curl -sfor silent mode to fetch/batchesendpoint from both domains - Pipes output through
jqto format JSON - Saves results to
1.txtand2.txt - Uses
diff --side-by-side --suppress-common-linesto show only differing lines in a side-by-side format--side-by-sidedisplays the differing lines from both files next to each other--suppress-common-linesensures only differing lines are shown
- Reports if differences were found or not
The script will display differences between the two batch endpoints side by side, or report "No differences found" if the responses are identical.
To build and push the Docker image for this script, you can use the following commands:
docker build -t your_dockerhub_username/compare_batches.sh:latest .
docker push your_dockerhub_username/compare_batches.sh:latest