Hack 85. How to generate random number in bash shell
by Ramesh
Use the $RANDOM bash built-in function to generate random number between 0 – 32767 as shown below.
- $ echo $RANDOM
- 22543
- $ echo $RANDOM
- 25387
- $ echo $RANDOM
- 647
当前内容版权归 Ramesh Natarajan 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 Ramesh Natarajan .