【发布时间】:2016-04-04 23:41:07
【问题描述】:
我得到了一个必须在 linux 命令行中完成的任务。
使用for、while 或until 在 linux 命令行中创建一个生成 30 位随机数的脚本:
a) no delay
b) 2 seconds delay
老实说,我不知道该怎么做。它不能包括 python 或 perl。 我只是一个初学者,所以任何帮助表示赞赏!
【问题讨论】:
-
而且我们不免费做作业^^
-
到目前为止,我已经测试了
tr -dc '0-9' </dev/urandom | head -c 30的可能性,但这不是我想要的,因为结果看起来很像:<numbers here>server:~$鉴于 python 也被排除在外,我不能使用 @ 987654327@ -
^^
tr -dc '0-9' </dev/urandom | head -c 30; echo看起来如何? :P
标签: linux bash shell command-line