-
I bumped into this and since I am 're-learning' ksh from scratch, I feel a bit disorientated, so pardon if there is a trivial answer to this.
I learned that It looks like for interactive So the And indeed the
Well I don't know what is normal or not for ksh93 but the variable behavior for interactive vs non-interactive is disturbing to (not orthogonal) to me. Any helps appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments
-
Cannot reproduce... in normal interactive use, with '-c', and with '-i -c', it all prints the same on my end.
So I have no idea what's going on at your end. But the Note that the |
Beta Was this translation helpful? Give feedback.
-
I was just able to reproduce this on Debian aarch64 with gcc 10.2.1-6 – though only when entering the reproducer directly at a command line, not when using either Relevant commit: b1b8d6f |
Beta Was this translation helpful? Give feedback.
-
@JohnoKing, can you reproduce this? |
Beta Was this translation helpful? Give feedback.
-
I have reproduced the bug in ksh2020 and the latest commit of ksh93u+m on Arch Linux x86_64 (built with gcc 12.2.0). So far I've only been able to reproduce this issue with binaries compiled using LTO. |
Beta Was this translation helpful? Give feedback.
-
Bug filed: #577 |
Beta Was this translation helpful? Give feedback.
-
Sorry I was out, ok seems a bug then, just to be precise I redo all my test with the very latest git dev branch, here are some results.
3.1 Script (non-interactive)
3.2 Interactive
3.3 ERE greed control
So applied to ksh93
So by implementing There is nothing in the ksh93 doc (I have ksh(1)) saying the ERE is greedy, the only ref of greedy is about ~(g) so not ~(E) yet ~(E) claim it is egrep(1) compatible then AFAIK egrep is greedy (as sed, etc...) 3.4 More trouble
This later test again I am not sure
All is ok (greedy) and non-greedy (via ?) both interactive and script (like @McDutchie, don't reprod)
Unfortunatly I can't test other OS'es, win, ios, bsd, solaris, aix, hpux, etc.... At this point I am inclined to think there is something specific to ubuntu 22.04 x86-64 as ubuntu 22.04 s390x seems good, may be in the libc.... If I recover some cycle this week I may look why we got this.... |
Beta Was this translation helpful? Give feedback.
-
After reviewing the regex(7) docco it sounds like greed is described with
It is way above my english understanding, specially the notion of priority. Anyway it sounds like
Then ksh scripting is WRONG when outputing something else |
Beta Was this translation helpful? Give feedback.
-
Should now be fixed in edf23e3. Thanks, Phi! |
Beta Was this translation helpful? Give feedback.
Should now be fixed in edf23e3. Thanks, Phi!