Re: breakpoints & line-endings
Re: breakpoints & line-endings
- Subject: Re: breakpoints & line-endings
- From: "Justin C. Walker" <email@hidden>
- Date: Thu, 23 Jun 2005 17:22:40 -0700
On Jun 23, 2005, at 16:25 , Tim Conkling wrote:
So it seems that a common solution to the breakpoints-not-working-
correctly-in-Xcode problem is to fix the line endings in source files.
I imagine that there is a way to perform this procedure on all my
source files (recursively, searching in directories) with some
command-line magic. I'm not very proficient in this sort of thing
-- can any CLI wizards out there tell me how to fix my files?
There are probably editors out there (e.g., BBEdit) that can handle
this as well, but for the GUI-challenged (which includes me :-}),
there is the 'tr' command ("translate"). The simplest way to do what
you want, on a single file, is:
tr "\015" "\012" < yourinputfile > youroutputfile
mv youroutputfile yourinputfile
which translates all "CR" characters in 'yourinputfile' to "NL"
characters and writes the output to 'youroutputfile'; you then
"rename" the latter to be the former (should you want to overwrite
your original file).
For safety's sake, you might want to save the originals before
starting :-}.
Note that this command assumes that the input is really ASCII; if the
file includes any multi-byte characters, you could be fouling things
up. 'tr' may npt distinguish real ASCII from those new-fangled file
types (*but*: see the man page for details; it does seem to grok some
of the 'locale' mechanisms).
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for General Semantics
--------
Men are from Earth.
Women are from Earth.
Deal with it.
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden