I want to write a bash script that continually runs a program over and over incrementing the first four digits by one each time until the output of the program changes from one thing to another.
For example:
./exampleProgram userName 0000-4567-4561-4564
output: Wrong
./exampleProgram userName 0001-4567-4561-4564
output: Wrong
./exampleProgram userName 0002-4567-4561-4564
output: Correct
-Loop terminates
The last three sets of four digits will stay constant, it's only the first four that change so the worst case scenario is about 10,000 loops.