shuf: exit without reading if would never output
commitf7867e73caac82349e5623d04e46aaf784778644
authorPádraig Brady <P@draigBrady.com>
Wed, 27 Mar 2013 11:06:00 +0000 (27 11:06 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 4 Apr 2013 01:55:55 +0000 (4 02:55 +0100)
tree6a08f079b9829745b107d3972e762138dacc2ec5
parent34023817cb0225b50779a546a58e057e5e920d2c
shuf: exit without reading if would never output

* src/shuf.c (main): If -n0 specified then no data would ever be output,
so exit without reading input.
* tests/misc/shuf.sh: Augment the related test with this case.
src/shuf.c
tests/misc/shuf.sh