Created
December 9, 2011 05:13
-
-
Save nikuuchi/1450281 to your computer and use it in GitHub Desktop.
100個の8桁以下のランダムな整数を出力する。あんまりうまくない作りなので、もう少し良いものが必要になったら作る。
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
| #!/usr/bin/env bash | |
| for i in {0..99};\ | |
| do \ | |
| num=`expr $i % 8 + 1`\ | |
| cat /dev/urandom | tr -c -d "[:digit:]" | head -c $num |sed -e 's/^00*/1/g';\ | |
| echo '';\ | |
| done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment