Path: utzoo!censor!geac!jtsv16!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!pasteur!helios.ee.lbl.gov!nosc!ncelvax!cathy From: cathy@ncelvax.UUCP (Cathy Benney) Newsgroups: comp.unix.questions Subject: tr Keywords: tr ascii Message-ID: <579@ncelvax.UUCP> Date: 16 Nov 89 05:28:56 GMT Distribution: usa Organization: Naval Civil Engineering Lab, Port Hueneme Lines: 9 Hello. I have been experimenting with "tr", the translate characters command. I am curious to know if tr can substitute from a single character in string 1 to multiple characters in string 2. For example, could "tr" substitute '\012' (the ascii new line) for '\015\012' (which would be ^M^J). I have been trying this, using a command like: tr '\012' '\015\012' < file.1 > file.2 but without any luck. In the command above, tr substitutes ascii 012 for ascii 015. What I would like is for tr to substitute every 012 with an 012 015. I am a novice in using tr (could you guess?), so my approach may be off, but I would appreciate any suggestions you may have. Thank you.