Differences between version 24 and predecessor to the previous major change of BashOneLiners.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 24 | Last edited on Friday, October 12, 2007 1:17:38 am | by AlastairPorter | Revert |
Older page: | version 23 | Last edited on Friday, June 8, 2007 1:11:37 am | by BenStaz | Revert |
@@ -58,8 +58,17 @@
From the ChoosingPasswords page (see that page for an explanation):
<verbatim>
tr -dc ' -~' < /dev/urandom | head -c 20
+ </verbatim>
+
+----
+
+!!! Getting a random number
+There is a built in function called <tt>$RANDOM</tt>
+
+ <verbatim>
+ echo $(($RANDOM % 100))
</verbatim>
----