shuffle man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

SHUFFLE(1)		  BSD General Commands Manual		    SHUFFLE(1)

NAME
     shuffle — print a random permutation of the command line arguments

SYNOPSIS
     shuffle [-0] [-f filename ...] [-n number] [-p number] [arg] [...]

DESCRIPTION
     The shuffle program prints a random permutation (or “shuffle”) of its
     command line arguments.  This can be useful in shell scripts for select‐
     ing a random order in which to do a set of tasks, view a set of files,
     etc.

     If the -f option is given, the data is taken from that files' contents or
     if the filename is - “stdin”.

     If the -n option is given, its argument is treated as a number, and the
     program prints a random permutation of the numbers greater than or equal
     to 0 and less than the argument.

     If the -p option is given, its argument is treated as a number, and the
     program prints that number of randomly selected lines or arguments in a
     random order.

     The -0 option changes the field separator character from \n to \0, so
     that the output is suitable to be sent to xargs(1) (to handle filenames
     with whitespace in them).

EXAMPLES
	   $ shuffle a b c d
	   c
	   b
	   d
	   a
	   $ shuffle -p 1 a b c d
	   d
	   $ shuffle -n 4 -p 2
	   0
	   3

SEE ALSO
     jot(1), random(6)

HISTORY
     The shuffle program first appeared in NetBSD 1.4.

AUTHORS
     Written by Perry E. Metzger ⟨perry@piermont.com⟩.

BSD			       February 18, 2009			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net