Skip to content

bjornedstrom/perm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PERM(1)                                                                PERM(1)



PERM
       perm - print permutations

SYNOPSIS
       perm [OPTIONS] [N]

DESCRIPTION
       Print all permutations of the integers 1 to N, to standard output.

       If  N  is  not  given,  print all permutations of all strings read from
       standard input.

       -d, --delimiter=DELIM
              use delimiter DELIM instead of space

       -l, --lex
              lexicographically permute using current locale

       -r, --reverse
              reverse order of permutations

       -z, --zero
              index at 0

       --help display this help and exit

       --version
              output version information and exit

EXAMPLES
       $ perm 4
       1 2 3 4
       1 2 4 3
       ...

       $ echo "a b c" | perm
       a b c
       a c b
       ...

       $ echo "c a b" | perm -l
       c a b
       c b a

ENVIRONMENT VARIABLES
       LC_COLLATE (or LC_ALL) can be set to change collation  when  using  the
       --lex  option for lexicographic permutations. The default is to use the
       system locale.

       Set LC_ALL=C to get the traditional sort order that  uses  native  byte
       values.

SEE ALSO
       shuf(1)

AUTHOR
       perm was written by Bjorn Edstrom <be@bjrn.se>.



                               December 24, 2011                       PERM(1)

About

unix program to print permutations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages