Sim - de acordo com a documentação - deve ser seguro embaralhar um arquivo no local:
-o output-file
--output=output-file
Write output to output-file instead of standard output.shuf
reads all input before opening output-file, so you can safely shuffle a file in place by using commands likeshuf -o F <F
andcat F | shuf -o F
.