Get random numbers under BASH and DOS
Mar.01, 2010 in
Uncategorized, Work notes, 工作笔记
Both Linux Bash and Windows DOS support random number generation. The random number is ‘stored’ in a system environment variable named “RANDOM” (I believe this variable links to a script to generate the actual random numbers on both systems), use it in the same way as you use other ENV variables. E.g.
On Linux:
1 | echo $RANDOM |
;
On Windows:
1 |
;

Leave a Reply