Created
January 9, 2017 14:12
-
-
Save paulboardman/e32addbe1715c027e8b231e28cd088ac to your computer and use it in GitHub Desktop.
Generate n integers selected randomly from 1 to m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -eu | |
n=100 | |
m=5 | |
for i in $(seq 1 $n); do | |
echo $(( (RANDOM % $m) + 1)); | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment