/bin/sh - POSIX?

j. van den hoff veedeehjay at gmail.com
Tue Mar 7 14:21:56 UTC 2017

On Tue, 07 Mar 2017 15:12:07 +0100, René J.V. Bertin <rjvbertin at gmail.com>  

> Hi,
> Can someone please confirm whether /bin/sh is still POSIX compliant on  
> 10.12.latest (i.e. `/bin/sh --version` shows it's actually bash), please?
> thanks,
> René

 from `man bash':

"If bash is invoked with the name sh, it tries to mimic the startup  
behavior of historical versions of sh
        as  closely as possible, while conforming to the POSIX standard as  

whatever "tries" means exactly ... ;-). there is another hint somewhere  
else at "brace expansion" handling. my reading of that is that you would  
have to call `sh +B' or do `set +B' within your script to get _strict_  
`sh' compliance. -- but better read the manpage yourself ;-)


Using Opera's revolutionary email client: http://www.opera.com/mail/

More information about the macports-users mailing list