Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sed - replace with octal/hex character

Status
Not open for further replies.

WildingLS

Technical User
May 22, 2002
2
GB
I have used tr to replace characters with an octal characters e.g. tr ',' '\043'
BUT
How do I use sed to do the same?

sed 's/,/\043/g' in > out

or

sed 's/,/\x23/g' in > out

This does not work for me.
Is it just a syntax error or is it the version of sed I use does not support conversion from to octal?

Any help apreciated.




 
I have found out how to do it....e.g.

'/s/0/'`echo "\043"`'/'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top