[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49217: 'shuf' returns nothing if the low range number is higher by 1
From: |
F8ER F8ER |
Subject: |
bug#49217: 'shuf' returns nothing if the low range number is higher by 1 than the high number |
Date: |
Fri, 25 Jun 2021 01:46:30 +0200 |
Dear GNU Developers,
Thank you very much for the project.
It seems, if the low range number is higher by 1 than the high number,
the program returns
nothing (with exit code = 0), while 102-100 results in an error and
100-100 returns 100 as expected.
For example, `shuf -i 101-100 -n 1` returns nothing with the exit code
= 0 (unexpected).
Expected (normal):
`shuf -i 100-101 -n 1` returns either 100 or 101 with an exit code = 0.
`shuf -i 100-100 -n 1` returns 100 with an exit code = 0.
`shuf -i 102-100 -n 1` results in an error with an exit code = 1.
Is that an expected behavior?
Stay safe!
Best and kind regards
- bug#49217: 'shuf' returns nothing if the low range number is higher by 1 than the high number,
F8ER F8ER <=
bug#49217: [PATCH] shuf: fix bug with "-i 1-0", Erik Auerswald, 2021/06/25
bug#49217: [PATCH] doc: clarify valid ranges for shuf -i, Erik Auerswald, 2021/06/26
bug#49217: [PATCH] tests: exercise shuf --input-range edge cases, Erik Auerswald, 2021/06/26