^M 's in uploaded text files.

Jonathan I. Kamens jik at athena.mit.edu
Fri Feb 2 08:23:33 AEST 1990


In article <1990Feb1.193031.11699 at iwarp.intel.com>,
merlyn at iwarp.intel.com (Randal
Schwartz) writes:
> Bzzzt.  Can't combine that sorta quoting.  tr will get '012' as an
> argument, not '\012', so what you wanted was either:
> 	"\\012"
> or
> 	'\012'

  Oh, really?

  In csh:

% cat testfile
line 1
line 2
% tr -d "\012" < testfile
line 1line 2% tr -d '\012' < testfile
line 1line 2%

  In sh:

$ tr -d "\012" < testfile
line 1line 2$ tr -d '\012' < testfile
line 1line 2$

  More relevantly (once again, in csh):

% echo \012
012
% echo "\012"
\012
% echo '\012'
\012
%

  So, what were you saying, Randal? :-)

Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8495			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list