Re: test -lt inconsistent about white space

2023-10-29 Thread Paul Eggert
On 2023-10-29 03:18, Oğuz wrote: I think the intented behavior was skipping both leading and trailing horizontal whitespace, which makes sense as a QOL feature, and switching over to strtoimax changed this. If that's the intent, which is self-consistent but which disagrees with all other shel

Re: test -lt inconsistent about white space

2023-10-29 Thread Oğuz
On Sun, Oct 29, 2023 at 8:49 AM Paul Eggert wrote: > My understanding is that Bash was intended to allow both leading and > trailing whitespace. This is compatible with ksh and with Dash. If > that's the intent, Bash should be consistent about it, just as ksh and > Dash are. There seems little poi

Re: test -lt inconsistent about white space

2023-10-29 Thread Martin D Kealey
I'm more concerned that the error message is misleading; "integer expression expected" is NOT true; rather an integer LITERAL is expected (meaning an optional sign followed by one or more digits). As for fixing the inconsistency, I would rather get rid of whitespace skipping entirely, perhaps with