• 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: Peter N Lewis <email@hidden>
  • Date: Fri, 24 Jun 2005 10:41:55 +0800

At 19:25 -0400 23/6/05, Tim Conkling wrote:
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?

People still use tr/awk/sed?

perl -i.bak -p -e 's#(\015\012|\015|\012)#\012#g' *.c *.h

-i means inplace. -i.bak will make backup copies. change to just -i to not save a backup (on your own head)

-p means read the input, process it, and print it automatically.

-e means the next thing is the script.

s search and replace

(\015\012|\015|\012) CRLF or CR or LF

with LF

globally

on a list of files.

Use at own risk of course.

Enjoy,
   Peter.

--
<http://www.stairways.com/>  <http://download.stairways.com/>
_______________________________________________
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: Cameron Hayne <email@hidden>
References: 
 >breakpoints & line-endings (From: Tim Conkling <email@hidden>)

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