Dear fellow Fedoreans,

I have some friends that play Lotto Texas and they buy tickets playing the same 
numbers every Wednesday and Saturday.  I subscribed to get the winning numbers. 
 If you match 3 or more numbers you are a winner.

The email has the following information
<Quote>

Texas Lottery - Lotto Texas - Winning Numbers for 10/10/2020

2 - 7 - 23 - 38 - 51 - 53

Lotto Texas Advertised Jackpot for 10/14/2020

Annuitized: $5.75 Million; Cash Value: $4.76 Million

</Quote>

The play 15 different sets of numbers and to check if they won any prize a 
script using a chain of if statements or case statements would be correct to 
implement this.  AWK may also do the job?
There are six numbers that we need to check let us suppose that we had the 
numbers in a file numbers.dat and it has the fifteen combinations

2 - 3 - 5 - 7 - 11 - 13
...
...
15 versions

Check against the winning numbers

2 - 7 - 23 - 38 - 51 - 53

Faster way to check compare string? Compare numbers one by one and check for at 
least 3

If (successful numbers >= 3)
  Write you have won $3
If (successful numbers >= 4)
  Write you have won $56
If (successful numbers >= 5)
 Write you have won $156
If (successful numbers > 5)
  Write you are a millionaire and have won the jackpot

The script will check for 3 or more numbers and write if we have winning 
numbers or not.  A bash script can do the job, or use AWK, grep or other 
commands.  I do not know if one uses (if commands or case commands)

Any pointers, tips are greatly appreciated.

Best Regards,


Antonio


Sent from ProtonMail, encrypted email based in Switzerland.

_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to