From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cortex.physiol.su.oz.au ([129.78.139.131]) by hawkwind.utcs.toronto.edu with SMTP id <24073>; Mon, 17 Jan 1994 05:35:36 -0500 Received: by cortex.physiol.su.oz.au (5.57/Ultrix3.0-C) id AA27218; Mon, 17 Jan 94 21:35:22 +1100 From: John (Farewell Horizontal!) Mackin Date: Mon, 17 Jan 1994 05:26:51 -0500 To: Sam Fans Subject: Re: How do I reference carriage returns? In-Reply-To: <9401141339.AA18744@beirnek> Message-Id: <199401172126.27123.sam.babad@physiol.su.oz.au> X-Face: 39seV7n\`#asqOFdx#oj/Uz*lseO_1n9n7rQS;~ve\e`&Z},nU1+>0X^>mg&M.^X$[ez>{F k5[Ah<7xBWF-@-ru?& @4K4-b`ydd^`(n%Z{ [Just making a guest appearance on the Sam Fans list.] This is a good question. The fact is that sam handles control characters rather well, always excepting null characters, but control-M presents a particular problem because (at least on UNIX under most conditions) you can't _type_ it. If you could type it, you could just deal with it directly -- try this with characters like control-A, control-G, et al. They work great, inserting themselves when typed, and functioning correctly inside commands. (You may have problems _displaying_ these characters, since they come down to the font you are using, presumably under X -- try to use a font which displays control characters somehow.) To return to control-M, though, you can't deal with it since there is no way to type it. This isn't too bad, usually, since in the typical case the file you want to fix up has a control-M as the last character of _every_ line, and so the trivial ,x/.$/d deals with it very effectively. If you aren't convinced that every line ends with control-M, then yes, old faithful tr is the best solution. OK, John.