Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] random in bash [Kmail Notification]
- To: tlug@example.com
- Subject: Re: [tlug] random in bash [Kmail Notification]
- From: Tod McQuillin <devin@example.com>
- Date: Thu, 7 Mar 2002 09:39:59 -0600 (CST)
- Content-type: TEXT/PLAIN; charset=US-ASCII
- In-reply-to: <87d6ygpg4x.fsf@example.com>
On 8 Mar 2002, Stephen J. Turnbull wrote: > If you're allowed to use tr(1), then head(1) should be OK? Sure, but head is just going to look for \012 bytes in the stream -- does that help? > head -10 /dev/random \ > | tr '\200-\377' '\000-\0177' \ > | tr --delete '\000-\0377\177' This is an interesting idea though. How about this, to get 8 random digits: tr -d '\372-\377' < /dev/urandom | dd bs=8 count=1 conv=sync 2>/dev/null | tr '\144-\307' '\000-\143' | tr '\310-\372' '\000-\143' | tr '\062-\143' '\000-\061' | tr '\024-\047' '\000-\023' | tr '\050-\061' '\000-\011' | tr '\012-\023' '\000-\011' | tr '\000-\011' 0-9 ; echo -- Tod McQuillin
- Follow-Ups:
- Re: [tlug] random in bash [Kmail Notification]
- From: Antony Stace
- References:
- Re: [tlug] random in bash [Kmail Notification]
- From: Stephen J. Turnbull
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] random in bash [Kmail Notification]
- Next by Date: Re: [tlug] RH7.2
- Previous by thread: Re: [tlug] random in bash [Kmail Notification]
- Next by thread: Re: [tlug] random in bash [Kmail Notification]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links