Created
June 18, 2014 03:21
-
-
Save doi-t/70e3fe45bc44d38ca7df to your computer and use it in GitHub Desktop.
awkで乱数生成
This file contains 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 | |
echo "---> sleep 0" | |
for loop in `seq 10`; do awk 'BEGIN{ srand(); print rand() }'; done | |
echo "---> sleep 0.5" | |
for loop in `seq 10`; do awk 'BEGIN{ srand(); print rand() }'; sleep 0.5; done | |
echo "---> sleep 1.0" | |
for loop in `seq 10`; do awk 'BEGIN{ srand(); print rand() }'; sleep 1.0; done | |
echo "---> srand(\$RANDOM)" | |
for loop in `seq 10`; do awk 'BEGIN{ srand('"$RANDOM"'); print rand() }'; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment