random - Create and manipulate randomizer channels
package require Tcl
package require memchan
random creates a random channel which absorbs everything written into it and uses it as a seed for a random number generator. This genera-
tor is used to create a random sequence of bytes when reading from the channel. It is not possible to seek the channel.
Memory channels created by random provide one additional option to set or query.
A random channel is always writable and readable. This means that all fileevent-handlers will fire continuously. To avoid starva-
tion of other event sources the events raised by this channel type have a configurable delay. This option is set in milliseconds and
defaults to 5.
fifo, fifo2, memchan, null, zero
channel, i/o, in-memory channel, random
Copyright (c) 2004 Pat Thoyts <email@example.com>
Memory channels 2.2 random(n)
Check Out this Related Man Page
null - Create and manipulate null channels
package require Tcl
package require memchan
The command described here is only available in a not-yet released version of the package. Use the CVS to get the sources.
null creates a null channel which absorbs everything written into it. Reading from it is not possible, or rather will always return zero
bytes. These channels are essentially Tcl-specific variants of the null device for unixoid operating systems (/dev/null). Transfer-
ing the generated channel between interpreters is possible but does not make much sense.
Memory channels created by null provide one additional option to set or query.
A null channel is always writable and readable. This means that all fileevent-handlers will fire continuously. To avoid starvation
of other event sources the events raised by this channel type have a configurable delay. This option is set in milliseconds and
defaults to 5.
A null channel is always writable and never readable. This means that a writable fileevent-handler will fire continuously and a readable
fileevent-handler never at all. The exception to the latter is only the destruction of the channel which will cause the delivery of an eof
event to a readable handler.
fifo, fifo2, memchan, random, zero
channel, i/o, in-memory channel, null
Copyright (c) 1996-2003 Andreas Kupries <firstname.lastname@example.org>
Memory channels 2.2 null(n)
Hi, how do I use /dev/urandom to generate a single number between 1-100? I can od /dev/urandom but it gives me an endless list of random numbers, I just want 1 between 1-100. How can I get that? Thanks. (12 Replies)
Hi one and all,
I'm working on a Bash script that is designed to calculate how much IP traffic has passed through a port to determine traffic volume over a given amount of time.
I've currently been able to use the netstat -s command coupled with grep to write to a file the total packets... (13 Replies)
I'm coding on Ubuntu 9.04 standard shell.
I'm writing a script that needs to generate a random number at some point of its execution.
When I do
echo $RANDOMas a command inside shell, I clearly get some randomly generated number
However when I do
echo $ior even... (14 Replies)
Hi, im trying to make a shell script that basically runs a random shell script form a list of shell scripts i specify. Im not very good at writing shell scripts, and am new to linux.
Thanks in advance :) (15 Replies)
I have 200 pictures in a folder and I would like move 10 random pictures every week to given folder automatically.
I have this server on 1and1.com.
So I tried the following using Bash script for manual copy and paste for testing
mapfile -t -n 3 files < <(find... (13 Replies)
Is there a tool somewhat parallel to rev, but which randomizes instead of reverses?
I've tried rl, but I can only get it to randomize words.
I was hoping for something like this
echo "hello" | ran
less simpler solutions are also welcome.
Sorry if the question is... (21 Replies)
This is my code:
nb_lignes=`wc -l $1 | cut -d " " -f1`
for i in $(seq $nb_lignes)
m=`head $1 -n $i | tail -1`
Please how can i change it to get Get 20% of lines in File randomly to apply "command" on each line ? 20% or 40% or 60 % (it's a parameter)
Thank you. (15 Replies)
i want to generate a random number through a script, and even if anyone reads the script, they wont be able to figure out what the random number is. only the person who setup the script would know it.
something like this could work: random
the full thread is here:
... (13 Replies)
I have two files containing hundreds of different sequences with the same Identifiers (ID-001, ID-002, etc.,), something like this:
ID-003... (18 Replies)
I've been attempting to create a script that downloads web pages at random intervals to mimic typical user usage. However I'm struggling to link $url to the URL list and thus wget complains of a missing URL. Any ideas?
url1="http://www.bbc.co.uk"... (14 Replies)
I have a column which have 7200 numbers and I am deciding to pick up 1440 numbers randomly without any reputation? Could any one let me know which script in unix will be work for my case?
Sajjad (17 Replies)
I am in a terrible emergency. I have multiple cdr files with line count >6000.
I need to append |0| | | | | | | |random| to end of each line. The random number should never repeat.
Please help with a shell script to process all cdr's in a directory with above requirement. (23 Replies)
I just got my hands on a T5120 running Sol10. As far as I've read, the T2 chip has a built-in hardware number generator. My question is: how can I access it to get random numbers in either C or Fortran? I'm using Sun Studio 12.4.
I am currently trying to write an... (13 Replies)
first of all this is not homework...this is a new type of exercise for practicing vocabulary with my students.
I have a file consisting of two columns, separated by a tab, each line consisting of a word and its definition, separated by a line break.
What i need is to replace a... (15 Replies)