Re: [PLUG] bash test...

2011-04-25 Thread Steve Beattie
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

Re: [PLUG] bash test...

2011-04-25 Thread Paul Charles Leddy
I did not know that: Debian Almquist shell (dash) is a Unix shell, much smaller than bash but still aiming at POSIX-compliancy. It requires less disk space but is also less feature-rich. ___ PLUG mailing list PLUG@lists.pdxlinux.org

Re: [PLUG] bash test...

2011-04-25 Thread Paul Heinlein
On Mon, 25 Apr 2011, Steve Beattie wrote: 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

Re: [PLUG] bash test...

2011-04-23 Thread Robert Citek
On Fri, Apr 22, 2011 at 11:42 PM, Russell Johnson r...@dimstar.net 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

Re: [PLUG] bash test...

2011-04-23 Thread Michael Ewan
On 4/22/2011 8:42 PM, 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.

[PLUG] bash test...

2011-04-22 Thread Russell Johnson
Does anyone see why I get Unexpected Operator with the following: if [ ${EBS} == /net/dbvol ]; then Russell Johnson r...@dimstar.net ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug

Re: [PLUG] bash test...

2011-04-22 Thread Paul Heinlein
On Fri, 22 Apr 2011, Russell Johnson wrote: Does anyone see why I get Unexpected Operator with the following: if [ ${EBS} == /net/dbvol ]; then == isn't a valid string operator. Try = instead. Russell Johnson r...@dimstar.net ___ PLUG

Re: [PLUG] bash test...

2011-04-22 Thread Robert Citek
Works for me: $ EBS=/net/dbvol $ if [ ${EBS} == /net/dbvol ]; then echo yes ;else echo no ; fi yes $ EBS=/net/dbvolx $ if [ ${EBS} == /net/dbvol ]; then echo yes ;else echo no ; fi no I suspect the error is elsewhere. Regards, - Robert On Fri, Apr 22, 2011 at 5:26 PM, Russell Johnson

Re: [PLUG] bash test...

2011-04-22 Thread Marvin Kosmal
What bash version are you using?? bash --version GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software; you are free to change and redistribute it.

Re: [PLUG] bash test...

2011-04-22 Thread Robert Citek
$ echo $BASH_VERSION 4.1.5(1)-release On Fri, Apr 22, 2011 at 9:52 PM, Marvin Kosmal mkos...@gmail.com wrote: What bash version are you using?? ___ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug

Re: [PLUG] bash test...

2011-04-22 Thread Dale Snell
On Fri, 22 Apr 2011 18:52:48 -0700 Marvin Kosmal mkos...@gmail.com wrote: What bash version are you using?? bash --version GNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later

Re: [PLUG] bash test...

2011-04-22 Thread Russell Johnson
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. Russell Johnson r...@dimstar.net