All of lore.kernel.org
 help / color / mirror / Atom feed
* command lookup and POSIX
@ 2014-03-07 19:43 Jason Miller
  2014-03-07 21:53 ` Eric Blake
  2014-03-08 17:22 ` Paul Gilmartin
  0 siblings, 2 replies; 5+ messages in thread
From: Jason Miller @ 2014-03-07 19:43 UTC (permalink / raw)
  To: dash

Reading this:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_01_01

Any built-in other than the special built-ins, or listed in the table
there should not be run unless it is present in the PATH.

dash however doesn't follow that:

PS1="% " dash

    % PATH=
    % /usr/bin/which [
    /usr/bin/which: no [ in ()
    % [ -x f ]
    % 

Of course I can't find a single shell that follows this, even when
enabling its respective strict POSIX mode.  I'm guessing it was added to
prevent changes in behaviors of existing scripts as shells add more
builtins.

However, changing dash to comply also seems of dubious value since there
are many shell scripts out there that depend on common built-ins not
listed in POSIX.

However DASH claims POSIX compliance so I thought I would at least
mention it now that I found it.

-Jason

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-08 17:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 19:43 command lookup and POSIX Jason Miller
2014-03-07 21:53 ` Eric Blake
2014-03-07 22:48   ` Jason Miller
2014-03-07 23:44     ` Eric Blake
2014-03-08 17:22 ` Paul Gilmartin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.