Yeah, yeah, some idiot came up with echo $RANDOM just to show me up
<g>, but you have to admit the elegancy of the script :)
Just kidding...
Regards,
-- Raju
>>>>> "Arun" == Arun Sharma <[EMAIL PROTECTED]> writes:
Arun> 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 :)
Arun> 10 forks to generate a random number ? :)
Arun> $ cat /proc/stat | grep processes processes 119269 $ echo
Arun> "ibase=16;" `cat /dev/urandom | head -2c | od -x | fgrep
Arun> 0000000 | cut -d ' ' -f2 | tr '[a-f]' '[A-F]'` | bc 13983 $
Arun> cat /proc/stat | grep processes processes 119280
Arun> -Arun
----------------------------------------------
An alpha version of a web based tool to manage
your subscription with this mailing list is at
http://lists.linux-india.org/cgi-bin/mj_wwwusr