The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Contact Us (Meet Our Management Team) > Forum Support Area for Unregistered Users & Account Problems
.
google unix.com



Forum Support Area for Unregistered Users & Account Problems Use this forum if you cannot login to the forums. NO TECHNICAL QUESTIONS - Guest who are not registered or have trouble with registration must post here for admin support.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SED to convert ~ in a file to newline ntekupal Shell Programming and Scripting 5 03-29-2009 11:10 PM
newline character trichyselva UNIX for Dummies Questions & Answers 9 10-31-2008 01:47 PM
replace a newline (\n) jeter Shell Programming and Scripting 3 05-18-2008 10:37 PM
problem escaping newline in ksh JamesByars Shell Programming and Scripting 7 01-05-2008 05:51 PM
grep the pattern followed by newline lalelle Shell Programming and Scripting 2 08-21-2007 08:02 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2008
Gale Gorman Gale Gorman is offline
Registered User
  
 

Join Date: Oct 2007
Location: Houston
Posts: 11
newline

I have an old file originally created in vi but read and saved by a word processor at some point.

I have ^Ms and know how to substitute them for anything I wish but I still only have one long line when viewed in vi.

So I suppose I need to substitute a newline for each ^M but I don't know the code to use.

Shouldn't make any difference but I'm using vi in MAC OSX Leopard.
  #2 (permalink)  
Old 05-04-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
i) Open this file in some word processor or advanced text editor. Select "unix newlines", "unix charset", "unix style" or something like that in the "Save as"-dialog when saving.
ii) use some script like dos2unix (dostounix, dos2ux, ..)
  #3 (permalink)  
Old 05-04-2008
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
  
 

Join Date: Jul 2006
Location: Germany, Berlin
Posts: 2,953
This forum is for NON technical questions only! Thread closed...
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:33 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0