So you’re working from the command line, and you need to do some character string manipulations. You could use sed or awk, but if the job is not overly complex, consider using tr. The tr command performs substitutions or deletions by character or by character set. It has a simple syntax and a few handy options. Here are a couple of examples.
tr A-Z a-z
In this case (above), tr will replace all uppercase characters with lowercase characters.
tr " " \n
In this case (above), tr will put each word on a line by itself.
Check out the links below for the full run down on tr.
Understanding Linux /Unix tr Command – nixCraft article
tr(1) – the man page for tr