Manual Reference Pages  - rand (1m_random)

NAME

rand - [M_random] generate pseudo-random permutations of file lines, whole numbers, or strings (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

syntax:

   rand FILES(s)   [ -n]
   rand STRINGS -e [ -n]
   rand -i LO-HI   [ -n]

DESCRIPTION

Generates pseudorandom permutations, similar to the shuf(1) command. Writes pseudo-random permutations of:
o the lines in a file
o a range of whole numbers
o a list of strings

OPTIONS

FILES(s)
  files to use as input
-e treat each ARG as an input line
-i LO HI
  treat each number LO through HI as an input line
-n output at most COUNT lines (per file)
--help
  display this help and exit
--version
  output version information and exit

EXAMPLES

Sample usage:

   # generate a random number from 0 to 100
   rand -i 0 100 -n 1

# randomly pick a line from a file rand -n 1 MYFILE.TXT

# randomly select xterm(1) color xterm -bg ‘rand green black gray blue -e -n 1‘

# randomly sleep 10 to 30 seconds sleep ‘rand 10 30 -n 1‘

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 rand (1m_random) April 12, 2023
Generated by manServer 1.08 from 12f25385-22c0-4f9e-89dc-0b1012c37fa7 using man macros.