LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Any way to substitute one character with couple of characters using tr program? (https://www.linuxquestions.org/questions/linux-software-2/any-way-to-substitute-one-character-with-couple-of-characters-using-tr-program-4175488295/)

froff 12-17-2013 08:26 AM

Any way to substitute one character with couple of characters using tr program?
 
Hello
I need simple encoding conversion in bash script.
But I need to convert to UTF-8 where national characters consist of two bytes.
Is there any way make such substitution with tr ?

smallpond 12-17-2013 09:06 AM

tr only works with single-byte characters. Use a recent version of sed instead.

froff 12-17-2013 02:43 PM

Quote:

Originally Posted by smallpond (Post 5082405)
tr only works with single-byte characters. Use a recent version of sed instead.

Thanks! I see I have to refector some scripts.


All times are GMT -5. The time now is 08:10 AM.