Mailing List Archive

Support open source code!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] random in bash [Kmail Notification]

> Do anyone know how to do a "random" in bash ? I guess that would be the 
> simpliest way to do that.

very crude....but

function rand
    /usr/bin/vmstat > $TMPFILE
    /usr/bin/uptime >> $TMPFILE
    /usr/bin/free   >> $TMPFILE
    /sbin/ifconfig   >> $TMPFILE 
    /bin/date   >> $TMPFILE 
    cksum $TMPFILE | awk '{print $1}'
    \rm $TMPFILE

should do all you want.  apart from that write a 10 line c program, it would take about 10 lines i am guessing.

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links