On Fri, Apr 22, 2011 at 08:42:27PM -0700, Russell Johnson wrote:
> On Apr 22, 2011, at 6:26 PM, Robert Citek wrote:
> > Works for me:
> > 
> > $ EBS="/net/dbvol"
> > 
> > $ if [ "${EBS}" == "/net/dbvol" ]; then echo yes ;else echo no ; fi
> > yes
> 
> Making it a single equal sign resolved the issue. 
> 
> I am using bash 4.1.5 on Ubuntu 10.04.

Note that in Ubuntu and Debian, /bin/sh is dash, not bash, which is
more strict in its posix sh(1) conformance ('==' for string comparisons
is a bashism). Login shells by default use bash, but shell scripts,
unless explicitly using bash via "#!/bin/bash" will by default be
interpreted by dash.

The checkbashisms script from the devscripts package on Debian and
Ubuntu will highlight issues for you.

-- 
Steve Beattie
<[email protected]>
http://NxNW.org/~steve/

Attachment: signature.asc
Description: Digital signature

_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to