Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 21 May 2002 09:07:33 -0700 (Pacific Daylight Time)
From: Michael A Chase <mchase@ix.netcom.com>
Subject:  Re: readline behaves differently from 2.0.4 to 2.0.5
To: "Zhou, Zhongyu" <zzhou01@sprintspectrum.com>,
   "'cygwin@cygwin.com'" <cygwin@cygwin.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Disposition: INLINE
References:  <3F06C9859CA7D31194ED0000D1ECC4AB147817B4@pkcexv007.sprintspectrum.com>
In-Reply-To:  <3F06C9859CA7D31194ED0000D1ECC4AB147817B4@pkcexv007.sprintspectrum.com>
Reply-To: Michael A Chase <mchase@ix.netcom.com>
Message-Id: <E17ACAh-0000BY-00@mclean.mail.mindspring.net>

On Tue, 21 May 2002 10:10:47 -0500 "Zhou, Zhongyu" <zzhou01@sprintspectrum.com> wrote:

> Hi,
>   I have just upgraded my cygwin (bash) from 2.0.4 to 2.0.5, and it broke
> one of our development scripts.  Basically what it did was, to drop the
> backslash from the input.   My readline version is 4.2a-1.
> e.g.,
>  test.sh     file
> ========= 
> contains:
> cat junk.txt | while read line
> do
>         if [ $line = "This\is\a\test" ] ; then

Note that (\) has special meaning to the shell.  Try using (') instead
of (") or doubling the \s to see if either makes a difference.
Considering how shell escaping in (") works, I don't see how this ever
worked.

>                 echo `cat junk.txt`
>         else
>                 echo "This is bad"
>         fi
> done
> 
> junk.txt  file
> ==============
> contains:
> This\is\a\test
> 
> I got an output This is bad.

-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

