tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sh: utilities implemented as a built-in



Thanks for your (as usual) insightful comments.

> but ksh, upon which the POSIX shell spec is based.
Ah, yes.

I thought Mac OS shipped with a real ksh. At least it doesn't fork on command
substitution, and no other shell seems to accomplish that. It calls itself
	Version AJM 93u+ 2012-08-01
so it looks like a ksh93 descendant.
However, it also doesn't complain on
	PATH=/nonexistant [ 1 -eq -1 ]
Do you know of any shell that actually complies to that part of POSIX?

> this is one area where I don't actually agree that what it says is absurd, 
> doing what it actually mandates - what ksh (the real one, not our /bin/ksh) 
> does - might actually be entirely rational.
Hm. What's the point of (assuming [ being implemented as a built-in)
	PATH=/nonexistant true
to succeed and
	PATH=/nonexistant [ 1 -eq -1 ]
to fail?

> There's not currently any easy way to tell them difference
Would it make sense for command -V et al to call (regular) built-in utilites 
``regular'' and omitting that word on utilities implemented a a built-in?

> But don't confuse the "special"  builtins with any of this, they're an
> entirely different kettle of fish.
Of course not, that's too easy. Also, ash is POSIX-conformant in command -V
calling them special (bash doesn't).


Home | Main Index | Thread Index | Old Index