https://github.com/ibara/shuf
ISC licensed reimplementation of GNU shuf.
https://github.com/ibara/shuf
bsd c isc openbsd unix utility
Last synced: 1 day ago
JSON representation
ISC licensed reimplementation of GNU shuf.
- Host: GitHub
- URL: https://github.com/ibara/shuf
- Owner: ibara
- License: isc
- Created: 2017-07-14T01:15:16.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-04T11:49:00.000Z (almost 6 years ago)
- Last Synced: 2025-03-31T05:51:05.998Z (12 months ago)
- Topics: bsd, c, isc, openbsd, unix, utility
- Language: C
- Homepage:
- Size: 24.4 KB
- Stars: 17
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
shuf
====
`shuf` is a utility that outputs a random permutation of its input lines.
It is an ISC licensed reimplementation of the `shuf(1)` utility from GNU
coreutils.
Usage
-----
```
shuf [-hv] [-n count] [-o outfile] [-rz] [file]
shuf [-hv] -e [-n count] [-o outfile] [-rz] [args ...]
shuf [-hv] -i lo-hi [-n count] [-o outfile] [-rz]
```
See `shuf.1` for more details.
Dependencies
------------
Because of its use of OpenBSD
[`arc4random_uniform(3)`](https://man.openbsd.org/arc4random_uniform.3),
[`getprogname(3)`](https://man.openbsd.org/getprogname.3),
[`reallocarray(3)`](https://man.openbsd.org/reallocarray.3), and
[`strtonum(3)`](https://man.openbsd.org/strtonum.3),
non-\*BSD users may need to install
[`libbsd`](https://libbsd.freedesktop.org/) to compile `shuf`.
`configure` will figure this out for you.
Compiling
---------
```
./configure
$ make
$ sudo make install
```
Reporting bugs
--------------
Patches always welcome.
`shuf` should not crash on any input. `shuf` has been extensively fuzzed with
[`afl-fuzz`](http://lcamtuf.coredump.cx/afl/) but more testing is always
better. Please file a bug report with crashing input if you find any.
`shuf` should perfectly mimic `GNU shuf` behavior, with minimal exceptions.
Two notable exceptions are better error messages and more strict getopt
handling. If you discover any areas where `shuf` does not mimic `GNU shuf`,
please file a bug report.
License
-------
ISC license. See `LICENSE` for details.
Download
--------
Tarballs are available under the Releases tab.
Please use the versioned tarball instead of the auto-generated tarballs.
Source code
-----------
Source code is hosted on GitHub: https://github.com/ibara/shuf