shuf
Randomly permute input lines to randomize their order. Supports an optional seed for deterministic, reproducible shuffling.
Instructions
Randomly permute input lines with optional deterministic seeding for reproducibility. Read-only, no side effects. Returns JSON with shuffled lines by default; use --raw for plain output. Set --seed for reproducible ordering. Use to randomize line order. Not for sorting — use 'sort' for ordered output. Not for deduplication — use 'uniq'. See also 'sort', 'uniq'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Maximum lines to output. | |
| encoding | No | Text encoding. | utf-8 |
| max_lines | No | Maximum JSON lines to emit. | |
| paths | No | Files to shuffle, or '-' for stdin. Defaults to stdin. | |
| raw | No | Write shuffled text without a JSON envelope. | |
| seed | No | Seed for deterministic shuffling. |