|
From: | Paul Eggert |
Subject: | bug#49217: 'shuf' returns nothing if the low range number is higher by 1 than the high number |
Date: | Thu, 24 Jun 2021 21:19:36 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 6/24/21 4:46 PM, F8ER F8ER wrote:
For example, `shuf -i 101-100 -n 1` returns nothing with the exit code = 0 (unexpected).
Actually, it's the expected behavior. It's the same behavior as 'shuf -n 1 </dev/null'. The '-n 1' option does not mean "output exactly 1 line"; it means "output at most 1 line".
[Prev in Thread] | Current Thread | [Next in Thread] |