random man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

RANDOM(6)		       BSD Games Manual			     RANDOM(6)

NAME
     randomrandom lines from a file or random numbers

SYNOPSIS
     random [-elrUuw] [-f filename] [denominator]

DESCRIPTION
     Random has two distinct modes of operations.  The default is to read in
     lines from the standard input and randomly write them out to the standard
     output with a probability of 1 / denominator.  The default denominator
     for this mode of operation is 2, giving each line a 50/50 chance of being
     displayed.

     The second mode of operation is to read in a file from filename and ran‐
     domize the contents of the file and send it back out to standard output.
     The contents can be randomized based off of newlines or based off of
     space characters as determined by isspace(3).  The default denominator
     for this mode of operation is 1, which gives each line a chance to be
     displayed, but in a random(3) order.

     The options are as follows:

     -e	     If the -e option is specified, random does not read or write any‐
	     thing, and simply exits with a random exit value of 0 to
	     denominator - 1, inclusive.

     -f filename
	     The -f option is used to specify the filename to read from.
	     Standard input is used if filename is set to ‘-’.

     -l	     Randomize the input via newlines (the default).

     -r	     The -r option guarantees that the output is unbuffered.

     -U	     Tells random(6) that it is okay for it to reuse any given line or
	     word when creating a randomized output.

     -u	     Tells random(6) not to select the same line or word from a file
	     more than once (the default).  This does not guarantee uniqueness
	     if there are two of the same tokens from the input, but it does
	     prevent selecting the same token more than once.

     -w	     Randomize words separated by isspace(3) instead of newlines.

SEE ALSO
     random(3), fortune(6)

HISTORY
     The functionality to randomizing lines and words was added in 2003 by
     Sean Chittenden ⟨seanc@FreeBSD.org⟩.

BUGS
     No index is used when printing out tokens from the list which makes it
     rather slow for large files (10MB+).  For smaller files, however, it
     should still be quite fast and efficient.

BSD			       February 8, 2003				   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net