On 12/04/2021 20:22, (Joerg Schilling) wrote:
Harald van Dijk <a...@gigawatt.nl> wrote:
On 12/04/2021 12:47, (Joerg Schilling) wrote:
Do you have a private variant og ksh93v?
I get the same behavior from ksh88, the ksh93 from OpenSolaris and ksh93v.
I don't. I was testing with ksh built from
<https://github.com/att/ast/archive/93v.tar.gz>. I will try to figure
out why I am getting different results from you.
OK, it depends on usage, so you may have tested the "wrong" way:
ksh93 -c 'PATH=/tmp/:$PATH; gcc'
gcc: no input files
ksh93 -ic 'PATH=/tmp/:$PATH; gcc'
ksh93: gcc: not found [Datei oder Verzeichnis nicht gefunden]
ksh93 -c 'PATH=/tmp/:$PATH; gcc; hash'
ksh93[1]: gcc: not found [Datei oder Verzeichnis nicht gefunden]
gcc=/tmp/gcc
ksh93 -c 'PATH=/tmp/:$PATH; gcc; echo'
ksh93[1]: gcc: not found [Datei oder Verzeichnis nicht gefunden]
this looks strange...
Ah, good catch, thanks. Multiple shells have an optimisation where a
command invocation at the last step, when no traps are active, is
implicitly performed by exec without a fork, as if the exec builtin had
been used. ksh apparently has a mismatch between the command lookup in
the two cases.
Cheers,
Harald van Dijk