X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-6.7 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_PD,TW_YG,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4D5C318F.6030604@redhat.com>
Date: Wed, 16 Feb 2011 13:20:31 -0700
From: Eric Blake <eblake@redhat.com>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: echo $(cygcheck...)  oddity
References: <4D5C127D.40401@member.fsf.org> <4D5C13D1.8010105@redhat.com> <OFE564C01B.7208557E-ON85257839.006C8E0A-85257839.006E7974@lnotes-gw.ent.nwie.net>
In-Reply-To: <OFE564C01B.7208557E-ON85257839.006C8E0A-85257839.006E7974@lnotes-gw.ent.nwie.net>
OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg
Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig338D679F562305E25096C54E"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

--------------enig338D679F562305E25096C54E
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 02/16/2011 01:06 PM, RISINGP1@nationwide.com wrote:
> I suspected a problem with \r, so I tried it.  However, I am using pdksh,=
=20
> and ended up with something that really was unexpected...

No, that's also expected.

pdksh echo obeys POSIX by default.  Bash echo does not.  Echo and
backslash is a non-portable combination (POSIX itself recommends using
printf if you suspect that you might be printing a backslash, because it
requires the pdksh behavior but so many people have come to expect the
bash behavior).  Since cygcheck output includes backslashes, you should
not expect any sensible behavior when trying to echo it, and should
instead use printf.

--=20
Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


--------------enig338D679F562305E25096C54E
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBCAAGBQJNXDGPAAoJEKeha0olJ0Nqh+AH/RQypWqebmb1BQneQaM7I1S1
Jp+mlNbiqnA4K/MRYYmoZ2WWj7ub+tPGTJZfi3Fsx9CPdxKl6AFpaUcqX8w4+aQF
0T9AY3L4wXc803ikgTqPVdr9+ASEbRoYT2BgB9vIIX23UvCD/pfAk/D+ixH9vXNm
2jALsYNwI6ZQ5XBsZ1jaiDGF+zqVakZMbjG2pvDtWhABJZycfYmGz576OwMdocjM
4KWsw/LMkJrn1p9NIv+RgpIcsN23LtMOn38Fm3Mmv8ZJB3/FTlA6E0dCH4wUFlm/
c3XmTwkf4/nsa8jWboTpPMMZ7M91XCWzjua6JB1Ctw8VkrBYSO0y/N4SAwiEQ5k=
=xmHI
-----END PGP SIGNATURE-----

--------------enig338D679F562305E25096C54E--
