in reply to Question about use of tr/ / / and s/ / /g
tr/// is the transliteration operator. It is used to convert all occurances of one character class to another:
s/// is the substitution operator. It replaces a pattern with some replacement string:tr/0-9/A-J/
The differences in the results can be subtle. A great explanation of when to use to which (don't rule out substr as a solution either) can be found at Code Smarter.s/foo/bar/
Jeff
R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
L-L--L-L--L-L--L-L--L-L--L-L--L-L--
|
|---|