$ echo "test>1w3" |sed 's/>/>/g'
test>gt;1w3
echo "test>1w3" |sed 's/>/\>/g'
John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order. -- Larry Wall
"&" is a special character in the replacement operand of
substitution REs, meaning "what got matched by the match
operand." In this case, that was ">", so ">" becomes
">gt;". You need to escape it to tell sed not to treat it
as a special character:
$ echo "test>1w3" |sed 's/>/\>/g'
test>1w3
--
Christopher Mattern
NOTICE
Thank you for noticing this new notice
Your noticing it has been noted
And will be reported to the authorities