[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sed ssed bug with the windows binaries
From: |
Guillaume Frambourg |
Subject: |
Re: sed ssed bug with the windows binaries |
Date: |
Fri, 13 Nov 2009 11:01:42 +0100 |
Hi again
Found a workarround :
command :
------------------------------
sed -e "s/\"//g" "test.txt>test2.txt"
------------------------------
Works as intended.
Sry for disturbing.
2009/11/13 Guillaume Frambourg <address@hidden>
> 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
>