Reverse the result of comparison, so that lines with greater key values
appear earlier in the output instead of later.
+@item -R
+@itemx --random-sort
+@opindex -R
+@opindex --random-sort
+@cindex random sort
+
+Sort by random hash, i.e. perform a shuffle. This is done by hashing
+the input keys and sorting based on the results.
+
@end table
Other options are:
reliably handle arbitrary file names (even those containing blanks
or other special characters).
+@itemx --seed @var{tempdir}
+@opindex --seed
+@cindex specify seed for random hash
+Specify a seed for the @option{--random-sort} option.
+
@end table
Historical (BSD and System V) implementations of @command{sort} have
@c printf 'c\n\nb\n\na\n'|perl -0pe 's/\n\n/\n\0/g'|sort -z|perl -0pe 's/\0/\n/g'
@c @end example
+@item
+Shuffle a list of directories, but preserve the order of files within
+each directory. For instance, one could use this to generate a music
+playlist in which albums are shuffled but the songs of each album are
+played in order.
+
+@example
+find . -maxdepth 2 -type f | sort -t / -k2,2R -k3,3
+@end example
+
@end itemize