SHUF(1) General Commands Manual SHUF(1)

# [NAME](#NAME)

shuf - Shuffle the input by outputting a random permutation of input lines. Each output permutation is equally likely. With no FILE, or when FILE is -, read standard input.

# [SYNOPSIS](#SYNOPSIS)

**shuf** \[OPTION]... \[FILE]  
**shuf** -e \[OPTION]... \[ARG]...  
**shuf** -i LO-HI \[OPTION]...

# [DESCRIPTION](#DESCRIPTION)

Shuffle the input by outputting a random permutation of input lines. Each output permutation is equally likely. With no FILE, or when FILE is -, read standard input.

# [OPTIONS](#OPTIONS)

[**-e**, **--echo**](#e)

treat each ARG as an input line

[**-i**, **--input-range** *&lt;LO-HI&gt;*](#i)

treat each number LO through HI as an input line

[**-n**, **--head-count** *&lt;COUNT&gt;*](#n)

output at most COUNT lines

[**-o**, **--output** *&lt;FILE&gt;*](#o)

write result to FILE instead of standard output

[**--random-seed** *&lt;STRING&gt;*](#random)

seed with STRING for reproducible output

[**--random-source** *&lt;FILE&gt;*](#random~2)

get random bytes from FILE

[**-r**, **--repeat**](#r)

output lines can be repeated

[**-z**, **--zero-terminated**](#z)

line delimiter is NUL, not newline

[**-h**, **--help**](#h)

Print help

[**-V**, **--version**](#V)

Print version

\[*file-or-args*]

# [VERSION](#VERSION)

v(uutils coreutils) 0.12.0

2026-10-12

---

Document: shuf(1) from uutils 0.12.0-r3 (Chainguard OS)
Source: https://github.com/uutils/coreutils
