I was generating (19 digit) sequential numbers like this:
seq 1234496713247997000 1234496713247998000 > seq_numbers.txt
and then validating them online using a luhn checker. Instead of doing a two step approach, How can i do this in a like a bash script for example all in one go, and output only valid numbers to a file?
You can use it as
You can put it up in a script as
script.sh
and set execute permissionschmod +x script.sh
and run asI was able to make it work on
GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)
and have not tested it on other systems.P.S.: Use it at your own risk!