• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: breakpoints & line-endings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: breakpoints & line-endings
      • From: Dave Camp <email@hidden>
References: 
 >breakpoints & line-endings (From: Tim Conkling <email@hidden>)

  • Prev by Date: Re: Disabling "You are about to undo past the last point this file was saved" sheet?
  • Next by Date: Re: breakpoints & line-endings
  • Previous by thread: breakpoints & line-endings
  • Next by thread: Re: breakpoints & line-endings
  • Index(es):
    • Date
    • Thread