This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: Bug of bash with sed operation ???
- To: cygwin at sourceware dot cygnus dot com
- Subject: Re: Bug of bash with sed operation ???
- From: Chris Faylor <cgf at cygnus dot com>
- Date: Tue, 20 Jun 2000 12:51:40 -0400
- References: <20000620161558.22088.qmail@web106.yahoomail.com>
- Reply-To: cygwin at sourceware dot cygnus dot com
On Tue, Jun 20, 2000 at 09:15:58AM -0700, Earnie Boyd wrote:
>--- Zhiguang Qian <zqian@cisco.com> wrote:
>> Hi,
>>
>> Here is the sample.
>>
>> >>export MY=\aaa\bbb.c
>> >>echo $MY | sed -e 's#\\#\/#g'
>> >> /aaa/bbb.c
>> >>out=`echo $MY | sed -e 's#\\#\/#g'`
>> >> sed: -e expression #1, char 8: Unterminated `s' command
>>
>> Try it.
>>
>
>I just tried it and it worked for me in version 2.03.0(2).
I think that 2.03.0(20) must be broken then. This isn't a bug. The quoting
rules used in a `..` are different than the rules in '...'. This fails on
every system that I tried this on. The problem is that the \ handling is
done in the `...` before the '...'. This is a typical problem with quoting
in a shell script.
At the very least the:
export MY=\aaa\bbb.c
is probably not doing what the user expects. That is equivalent to:
export MY=aaabbb.c
cgf
>So, what are our differences? It could be sed but I'm thinking that it is a
>bug introduced in bash-2.04.
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com