Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

randtype(1) [debian man page]

randtype(1)						      General Commands Manual						       randtype(1)

NAME
randtype - Output characters or lines at random intervals SYNOPSIS
randtype [ -l ] [ -d ,|.<string> [ -k ] ] [ -t <ms,mult> ] [ -w <string> [ -c ms,mult ] ] [ -r s1,s2[:...] ] [ -n <string> ] [ -q <int> ] [ -m <int> ] [ file ... ] DESCRIPTION
randtype reads input from either standard input or from a file and outputs each character or line at random intervals. If multiple files are specified, each is read in sequence. OPTIONS
randtype recognizes the following command line options: -c ms,mult For optional use with the -w option, this has the same microsecond and multiplier value format as the -t option. The default for this option is specified at compile time. -d string Output everything before (left) or after (right) the specified string immediately. The string must begin with either ',' or '.' which specifies the direction, left or right, respectively. -h Print a summary of the command line options and exit. -k Suppress output of the string specified by the dump string option. -l Output lines rather than characters. Only the -t and -q options are valid when using this option, all other options are ignored. -m int Generate random mistakes. The int value is how many times to compare and match the next character and a randomly generated charac- ter. -n chars Output the specified characters immediately with no random waiting. -r s1,s2[:...] Replace the string s1 with string s2. You can specify multiple replacements by separating them with a ':'. -q int Quit the program after this many seconds. -t ms,mult This option refines the random delay of output. The value of the argument is separated by a comma with the first argument being a microsecond and the second being a multiplier of a random number between 0 and the microsecond. A character-per-second effect can, for example, be made by setting the microsecond to 0 and the multiplier to 1000000. The default for this option is specified at com- pile time. -v Display version information and exit. -w chars The inverse of the -n option; this option waits on the specified characters. Use the -c option to refine the random delay of output. EXAMPLE
randtype -t 13,16000 -d ",*MAGIC*" -k -n '0ou' filename SEE ALSO
random(3), srandom(3), alarm(2), select(2) AUTHOR
This program was created by bjk <bjk@arbornet.org> and released under the terms of the GNU General Public License version 2 or later. randtype randtype(1)

Check Out this Related Man Page

RANDOM(6)							 BSD Games Manual							 RANDOM(6)

NAME
random -- random 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 randomize the contents of the file and send it back out to standard out- put. 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 anything, 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
Man Page