On Mon, Nov 20, 2000 at 08:58:12PM +0530, Raju Mathur wrote:
> Try this for a 2-byte random number (line may wrap):
>
> echo "ibase=16;" `cat /dev/urandom | head -2c | od -x | fgrep 0000000 | cut -d ' '
>-f2 | tr '[a-f]' '[A-F]'` | bc
>
> YAISOLFYOM (roughly expands to Yet Another Incredible Shell One-Liner
> >From Ye Olde Monke :)
10 forks to generate a random number ? :)
$ cat /proc/stat | grep processes
processes 119269
$ echo "ibase=16;" `cat /dev/urandom | head -2c | od -x | fgrep 0000000 | cut -d
' ' -f2 | tr '[a-f]' '[A-F]'` | bc
13983
$ cat /proc/stat | grep processes
processes 119280
-Arun
----------------------------------------------
The mailing list archives are available at
http://lists.linux-india.org/cgi-bin/wilma/LIH