Skip to content

Instantly share code, notes, and snippets.

@mxgrey
Created April 3, 2024 09:43
Show Gist options
  • Save mxgrey/cb3c7055a03c3fd3d3352bfb62aab10a to your computer and use it in GitHub Desktop.
Save mxgrey/cb3c7055a03c3fd3d3352bfb62aab10a to your computer and use it in GitHub Desktop.
#!/bin/bash
success_counter=0
failure_counter=0
mkdir failures
while [ $failure_counter -lt 100 ]
do
clear
echo "=============== $RMW_IMPLEMENTATION | Failures: $failure_counter | Successes: $success_counter =========================="
"$@" &> failures/tmp.txt
if [ "$?" -eq 0 ]; then
success_counter=$((success_counter+1))
else
failure_counter=$((failure_counter+1))
mv failures/tmp.txt failures/${failure_counter}.txt
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment