Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
X-Sender: rschulz@mailhost.teknowledge.com
Message-Id: <v04011707b354cc68d4bc@[206.173.234.250]>
In-Reply-To: <19990504151508.11830.rocketmail@send205.yahoomail.com>
Date: Tue, 4 May 1999 09:14:27 -0700
To: cygwin@sourceware.cygnus.com
From: "Randall R. Schulz" <rschulz@teknowledge.com>
Subject: Re: bash 2.0.2 backquoted text includes final carriage return
Cc: earnie_boyd@yahoo.com, Bill Kelly <kelly@softwired-inc.com>

Hello,

The original complaint is correct. Here's what happens on Solaris under
bash 2.0.2:

1001> shell
BASH=/usr/local/bin/bash; BASH_VERSION=2.01.0(1)-release

1002> echo -n `hostname` |od -c
0000000   n   i   t   r   o   g   e   n
0000010


Here's the same under Linux:

1001> shell
BASH=/bin/bash; BASH_VERSION=2.02.0(3)-release
1002> echo -n `hostname` |od -c
echo -n `hostname` | od -c
0000000   t   i   t   a   n   i   u   m   .   t   e   k   n   o   w   l
0000020   e   d   g   e   .   c   o   m
0000030


BTW, using $( ... ) instead of ` ... ` (my personal preference) yields the
same results.

Lastly, on page 18 of my copy of the BASH manual (sec. 3.10.2 Command
Substitution), it is explicitly stated that trailing newlines are removed.


Randy Schulz
Teknowledge Corp.
Palo Alto, CA USA

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

