Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bakkeby/comb
Combination generator with support for non-combineable selections
https://github.com/bakkeby/comb
combinations generator
Last synced: 3 days ago
JSON representation
Combination generator with support for non-combineable selections
- Host: GitHub
- URL: https://github.com/bakkeby/comb
- Owner: bakkeby
- License: mit
- Created: 2024-07-09T13:23:44.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-09T14:42:54.000Z (4 months ago)
- Last Synced: 2024-07-09T20:14:03.802Z (4 months ago)
- Topics: combinations, generator
- Language: C
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `comb`: A combination generator
`comb` is a simple tool that generates combinations from the possible values given the specified
sample size and prints the results to standard out.The first argument is the sample size; it is the number of values to pick per combination.
This would be the r in the nCr formula for computing combinations with n being the number of values.
The remaining arguments are the values to pick from.
If an argument contains multiple values separated by space then these will be treated as individual
but non-combinable values.This program does not read from standard in.
Example usage:
```
$ comb 4 A B C D E
A B C D
A B C E
A B D E
A C D E
B C D E
```
```
$ comb 3 A B C "D E"
A B C
A B D
A B E
A C D
A C E
B C D
B C E
```## Installation
```
$ git clone https://github.com/bakkeby/comb.git
$ cd comb
$ sudo make install
$ comb
```## License
`comb` is available under an MIT license. See the `LICENSE` file.