Bug of bash with sed operation ???
Tue Jun 20 09:51:00 GMT 2000
On Tue, Jun 20, 2000 at 09:15:58AM -0700, Earnie Boyd wrote:
>--- Zhiguang Qian <firstname.lastname@example.org> wrote:
>> 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:
is probably not doing what the user expects. That is equivalent to:
>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 email@example.com
More information about the Cygwin