RANDOM(6)

πŸ“¦
version 2.17 Β· 3 versions
, in debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu resolute, ubuntu stonking

πŸ’– RANDOM πŸ’–

okay bestie, welcome to random(6) from the Games Manual β€” yes she lives in the games section, she's fun like that πŸŽ€


✨ NAME ✨

random β€” random lines from a file or random numbers 🎲


πŸ¦‹ SYNOPSIS πŸ¦‹

random [-er] [denominator]

🌸 DESCRIPTION 🌸

so here's the vibe: random reads lines from standard input and copies them over to standard output β€” but only with a probability of 1/denominator. it's giving "maybe, maybe not" πŸ’…

and if you don't pass a denominator? no worries babe, the default value for denominator is 2. fifty-fifty, a coin flip, iconic behavior fr fr πŸͺ™

πŸ‘‘ OPTIONS πŸ‘‘

the options are as follows:

  • -e β€” if you specify this one, random does not read or write <em>anything</em>. she just exits. like, immediately. and the exit value is a random number from 0 to denominator-1, inclusive ✨ (so yes, it's a little randomness dispenser, no cap)
  • -r β€” this one guarantees that the output is unbuffered. no sitting around in a buffer, she's posting live πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

  • fortune(6) β€” go get you some wisdom, bestie πŸ“

reminder bestie: -e means literally nothing gets read or written. she's not being shy, that's just the assignment πŸ’€

okay that's the whole page, mwah 🫢 this lil gem is from Debian and it's dated March 31, 1994 β€” old enough to be your cool aunt who still slays πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from