bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sed ssed bug with the windows binaries


From: Guillaume Frambourg
Subject: sed ssed bug with the windows binaries
Date: Fri, 13 Nov 2009 10:46:22 +0100

Hi,

When you try to replace " with some character that is not escaped, it works.
But it won't accept to save the output in another file.

ie :

test.txt contains

"hello"

Working sed is :
--------------------------------------------------------
sed -e "s/\"//g" test.txt
--------------------------------------------------------

it outputs :
--------------------------------------------------------
hello
--------------------------------------------------------

But if you try :
--------------------------------------------------------
sed -e "s/\"//g" test.txt > test2.txt
--------------------------------------------------------

it outputs :
--------------------------------------------------------
hello
sed: can't read >: Invalid argument
--------------------------------------------------------

Also trying :
--------------------------------------------------------
sed -e "s/\"/\"test/g" test.txt > test2.txt
--------------------------------------------------------

it outputs "testhello"test into test2.txt


So using an escaped character in search string but not in replacestring
breaks the command line interpretation.

Thanks


reply via email to

[Prev in Thread] Current Thread [Next in Thread]