Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

random(n) [osx man page]

random(n)																 random(n)

__________________________________________________________________________________________________________________________________________________

NAME
random - Create and manipulate randomizer channels SYNOPSIS
package require Tcl package require memchan random _________________________________________________________________ DESCRIPTION
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. OPTIONS
Memory channels created by random provide one additional option to set or query. -delay ?milliseconds? 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. SEE ALSO
fifo, fifo2, memchan, null, zero KEYWORDS
channel, i/o, in-memory channel, random COPYRIGHT
Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> Memory channels 2.2 random(n)

Check Out this Related Man Page

zero(3tcl)                                                                                                                              zero(3tcl)

NAME
zero - Create and manipulate zero channels SYNOPSIS
package require Tcl package require memchan zero DESCRIPTION
The command described here is only available in a not-yet released version of the package. Use the CVS to get the sources. zero creates a zero channel which absorbs everything written into it. Reading from a zero channel will return the requested number of null bytes. These channels are essentially Tcl-specific variants of the zero device for unixoid operating systems (/dev/zero). Transferring the generated channel between interpreters is possible but does not make much sense. OPTIONS
Memory channels created by zero provide one additional option to set or query. -delay ?milliseconds? A zero 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. SEE ALSO
fifo, fifo2, memchan, null, random KEYWORDS
channel, i/o, in-memory channel, null, zero COPYRIGHT
Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> Memory channels 2.2 zero(3tcl)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

/dev/urandom

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)
Discussion started by: Takumi
12 Replies

2. Shell Programming and Scripting

randomization

I have two files: First file with 10 words, as follow: randomword1, randomword2, randomword3, randomword4, etc... Second File shell script. word=$(cat hangman_words | cut -d" " -f1) letters=$(echo $word | wc -c) letters=$(( $letters - 1 )) echo $letters echo $word The script... (13 Replies)
Discussion started by: keyvan
13 Replies

3. UNIX for Dummies Questions & Answers

Retrieving random numbers out of a text file

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)
Discussion started by: nistleloy
13 Replies

4. Shell Programming and Scripting

$RANDOM does not work inside a shell script

Hi folks 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 i=`$RANDOM` echo $ior even... (14 Replies)
Discussion started by: ksk
14 Replies

5. Shell Programming and Scripting

Shell script that runs a random shell script

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)
Discussion started by: kylecn
15 Replies

6. Shell Programming and Scripting

copying random Jpg files to different folder

Hi, 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 #!/bin/bash mapfile -t -n 3 files < <(find... (13 Replies)
Discussion started by: raamkum
13 Replies

7. Shell Programming and Scripting

Randomize letters

Hi, 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 leolh less simpler solutions are also welcome. Sorry if the question is... (21 Replies)
Discussion started by: jeppe83
21 Replies

8. Shell Programming and Scripting

Get 20% of lines in File randomly

Hello, This is my code: nb_lignes=`wc -l $1 | cut -d " " -f1` for i in $(seq $nb_lignes) do m=`head $1 -n $i | tail -1` //command done 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)
Discussion started by: chercheur857
15 Replies

9. Shell Programming and Scripting

Generate random numbers in script

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)
Discussion started by: SkySmart
13 Replies

10. Shell Programming and Scripting

Randomly selecting sequences and generating specific output files

I have two files containing hundreds of different sequences with the same Identifiers (ID-001, ID-002, etc.,), something like this: Infile1: ID-001 ATGGGAGCGGGGGCGTCTGCCTTGAGGGGAGAGAAGCTAGATACA ID-002 ATGGGAGCGGGGGCGTCTGTTTTGAGGGGAGAGAAGCTAGATACA ID-003... (18 Replies)
Discussion started by: Xterra
18 Replies

11. Shell Programming and Scripting

Random web page download wget script

Hi, 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? Thanks #!/bin/sh #URL List url1="http://www.bbc.co.uk"... (14 Replies)
Discussion started by: shadyuk
14 Replies

12. UNIX for Advanced & Expert Users

UNIX script for making random numbers without repetition

Hello, 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? Regards Sajjad (17 Replies)
Discussion started by: sajmar
17 Replies

13. Shell Programming and Scripting

Help with appending random sequence to huge CDR file

Hi, 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)
Discussion started by: shiburnair
23 Replies

14. Solaris

True random numbers in Sol10

Hi everyone 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)
Discussion started by: toguro123
13 Replies

15. UNIX for Beginners Questions & Answers

Random letters

Hi there, 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)
Discussion started by: eldeingles
15 Replies