Saturday, 5 December 2009

get sed to work with " (double quote) and | or > (pipe) in windows

firstly, using " in sed is absolutely working in screen output, like

sed -e "s/\"//"

but not

sed -e "s/\"//" | clip

and not

sed -e "s/\"//" > abc.txt

to work with pipe in windows, I tried to escape " to be "" or \" or \"" and \"\"

unfortunately, they dont work

under surfing tens of pages in google, I get

\x22 to escape " in windows with gnu sed to work with the pipe

http://www.cornerstonemag.com/sed/ does a good comparison, but the link inside the page seems broken, \X22 is the sed function of "hex code entry via \xHH"

gnu sed, http://gnuwin32.sourceforge.net/packages/sed.htm


No comments:

Labels

Search This Blog