using tr

Hi,

I'm trying to replace a comma (but it can be used for any other character) using tr with a a new line, is it possible to make declare comma as a string first and then use it in the tr command?

(my shell is dodgy, beginner)

eg:

$comma = ','

tr "\012" '$comma'

Thanks for your time

If you enclose your variable in single quotes it will not be interpreted. Enclose it in double quotes instead.