[OT] UNIX heads; can I do this?
[OT] UNIX heads; can I do this?
- Subject: [OT] UNIX heads; can I do this?
- From: Bill Briggs <email@hidden>
- Date: Wed, 13 Jun 2007 16:54:31 -0300
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.
- web
_______________________________________________
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