Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
From: "John Pollock" <jpollock@curl.com>
To: "Bob McGowan" <rmcgowan@veritas.com>
Cc: <cygwin@sourceware.cygnus.com>
Subject: RE: echo with sh.exe doesn't understand multiple parameters
Date: Thu, 19 Oct 2000 18:43:45 -0400
Message-ID: <NEBBJPGNBOKKDAEIIMIKOEDKCCAA.jpollock@curl.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
In-Reply-To: <39EF56DB.5CA9CB9@veritas.com>

Thanks Bob and others who responded.  FWIW, sh on Linux accepts -e and -n at
the same time, which is how we managed to run into our trouble (we do
concurrent builds on Linux and Windows).  But i'll be changing
our -e -n references to use -e and \c.

Thanks!
John

-----Original Message-----
From: Bob McGowan [mailto:rmcgowan@veritas.com]
Sent: Thursday, October 19, 2000 4:18 PM
To: John Pollock
Subject: Re: echo with sh.exe doesn't understand multiple parameters


These are mutually exclusive options.  The -n makes echo emulate the old
Bourne shell behavior, -e the new.

   echo -n test
and
   echo -e 'test\c'

Are equivalent.  The other backslash sequences recognized when -e is used
had no equivalent in older shells.  You had to embed litteral characters,
where possible.

Hope this helps.

John Pollock wrote:
>
> With the echo command, using -n or -e alone with sh works fine:
>
> $ echo -e blah
> blah
> $ echo -n blah
> blah$
>
> but when you try to use both flags at once, sh seems to get confused:
>
> blah$ echo -n -e blah
> -e blah$
>
> Is there a workaround?
>
> John
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

--
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan@veritas.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

