mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-17 16:55:50 +02:00
20 lines
478 B
Markdown
20 lines
478 B
Markdown
# shuf
|
|
|
|
> Genera permutaciones aleatorias.
|
|
> Más información: <https://manpagez.com/man/1/shuf/>.
|
|
|
|
- Ordena aleatoriamente las líneas de un fichero y muestra el resultado:
|
|
|
|
`shuf {{nombre_archivo}}`
|
|
|
|
- Sólo muestra las 5 primeras entradas del resultado:
|
|
|
|
`shuf --head-count=5 {{nombre_archivo}}`
|
|
|
|
- Escribe el resultado en otro archivo:
|
|
|
|
`shuf {{nombre_archivo}} --output {{nombre_archivo_salida}}`
|
|
|
|
- Genera números aleatorios en el rango 1-10:
|
|
|
|
`shuf --input-range=1-10`
|