mardi 22 octobre 2019

Linux Bash: How to Generate Random Numbers Aligned to a Value

I want to generate random numbers in a linux bash script which are aligned to a fixed value within a specific range. For instance, if the numbers are aligned to X and the range is [0, Y], the numbers should randomly be selected from this list: [0, X, 2X, 3X, 4X, ..., Y]. How can I generate these numbers?




Aucun commentaire:

Enregistrer un commentaire