• 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: Dave Camp <email@hidden>
  • Date: Thu, 23 Jun 2005 17:33:47 -0700

On Jun 23, 2005, at 5:22 PM, Justin C. Walker wrote:


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).

I think the above will not work so good on files with DOS line endings. You'll get double CR's or double LF's depending on which way you go...


Dave

---
It's not denial. I'm just very particular about the reality I choose to accept. -Calvin


_______________________________________________
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: "Justin C. Walker" <email@hidden>
References: 
 >breakpoints & line-endings (From: Tim Conkling <email@hidden>)
 >Re: breakpoints & line-endings (From: "Justin C. Walker" <email@hidden>)

  • Prev by Date: Re: breakpoints & line-endings
  • Next by Date: Re: breakpoints & line-endings
  • Previous by thread: Re: breakpoints & line-endings
  • Next by thread: Re: breakpoints & line-endings
  • Index(es):
    • Date
    • Thread