* Summary: Control characters in shell file
@ 2003-01-29 13:57 Smith, Mike R.
0 siblings, 0 replies; only message in thread
From: Smith, Mike R. @ 2003-01-29 13:57 UTC (permalink / raw)
Thanks to the many of you who responded. Since you took the time to respond, I will take the time to list you.
Somehow Emacs is acting like a windows based environment and is putting carriage returns in the files.
Several solutions were presented, which are quite simple. I used the one at the tool but I see that many of the others should work too. It just depends on whether you want to fix it from inside the file or outside the file.
:%s%<control-V><control-M>$%% (use vi to get rid of them)
The MTOLLS subset has a dos2unix prog that will remove them
tr -d '\015' < dosfile > unixfile <- simplification, but it'll do
cat file_name | col -b > new_file_name
strings originalfile > newfile
sed -e 's/^M//g' <filename> > <new_filename>
The ^M characters are the end of line markers put in by DOS/Windows. The
easiest way to get rid of them is to use emacs replace. To get the ^M, you
need to use CTRL-Q - CTRL-M and replace with null.
Thanks to Chris Bryant, Thomas Sjolshagen, Galen Johnson, Dr. Thomas Blinn, Charles Ballowe, Brajesh Kumar, Phillip Brown, Blehl Blake, Premjit Nair, Jesper Frank Nemholt, Keith Texel, Joerg Bruehe, Matthew Wild, Mark Deiss, Harm Enging.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-29 13:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-29 13:57 Summary: Control characters in shell file Smith, Mike R.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox