The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM



Thread: vi
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-08-2007
Gale Gorman Gale Gorman is offline
Registered User
 

Join Date: Oct 2007
Location: Houston
Posts: 6
vi

I have a file that at some point I removed all ^Ms and now I'm trying to put a newline return where the ^Ms used to be.

I probably removed the ^Ms a few years ago in Linux or SCO Xenix and now I'm using a MAC.

With the file opened with vi I have tried the following:

:%s/\.[A-Z]/\.^N[A-Z]/g

I'm entering the ^N as ctrl-V ctrl-N and the /g is because as the file stands now I have 2 really long lines.

The results I'm getting are just the literal ^N[A-Z].
Reply With Quote
Forum Sponsor