[Asterisk-Dev] gmake issues (solved, #5885 on mantis)

Edwin Groothuis edwin at mavetju.org
Tue Nov 29 14:34:45 MST 2005


On Tue, Nov 29, 2005 at 06:30:58AM -0800, Luigi Rizzo wrote:
> On Tue, Nov 29, 2005 at 11:34:40PM +1100, Edwin Groothuis wrote:
> > On Tue, Nov 29, 2005 at 04:21:44AM -0800, Luigi Rizzo wrote:
> > > ok found the bug, see the report on mantis #5885
> > 
> > That's a /bin/sh vs /bin/bash-symlinked-to-/bin/sh issue.
> 
> what do you mean by that ? that some shell variant takes
> 'test' as builtin and then accepts the '==' variant ?

This is on FreebSD:
    -r-xr-xr-x  1 root  wheel  753864 Feb 24  2004 /bin/sh
It's the real /bin/sh

This is on Linux:
    lrwxrwxrwx  1 root root 4 Oct 27  2004 /bin/sh -> bash
It's the real /bin/bash


On /bin/sh:
    $ [ "a" == "b" ] && echo hi
    [: a: unexpected operator
    $

On /bin/bash
    $ [ "a" == "b" ] && echo hi
    $


So yeah, bash understands that when you use ==, you mean = :-/

Edwin
-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin at mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/



More information about the asterisk-dev mailing list