• 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: [OT] UNIX heads; can I do this?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] UNIX heads; can I do this?


  • Subject: Re: [OT] UNIX heads; can I do this?
  • From: "J. Stewart" <email@hidden>
  • Date: Wed, 13 Jun 2007 17:01:12 -0400

On 6/13/07 at 3:54 PM, Bill Briggs <email@hidden> spake thusly:

I want to take a text file with Mac (cr) line endings and change to UNIX (lf) line endings (eventually I'm piping it to awk, which needs the lf or it sees it all as one line).
So far I can find and clobber all of the cr's, but can't get it to replace with lf's. I'm doing this (where you get the ^M by holding Ctrl and pressing V and Return in sequence). Note that the replace field is empty in the following.


sed -e 's/^M//g' t.txt | cat > b.txt

I've tried replacing with \f, \n, \x0A, and nothing seems to work. I can't seem to determine the magic sauce to get that line feed inserted.
Then again, maybe it's not possible to do that with sed, but I can't see why not.


<x-man-page://tr>

JBS
--
One of the many things no one tells you about aging is that it is such a nice change from being young. — Will Rogers
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden
References: 
 >[OT] UNIX heads; can I do this? (From: Bill Briggs <email@hidden>)

  • Prev by Date: Re: [OT] UNIX heads; can I do this?
  • Next by Date: Re: [OT] UNIX heads; can I do this?
  • Previous by thread: Re: [OT] UNIX heads; can I do this?
  • Next by thread: Re: [OT] UNIX heads; can I do this?
  • Index(es):
    • Date
    • Thread