rand - [M_random] generate pseudo-random permutations of file lines, whole numbers, or strings (LICENSE:PD)
Synopsis
Description
Options
Examples
Author
License
syntax:
rand FILES(s) [ -n] rand STRINGS -e [ -n] rand -i LO-HI [ -n]
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
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
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
John S. Urban
Public Domain
Nemo Release 3.1 | rand (1m_random) | April 12, 2023 |