Solved

Inserting a CRLF in VI

Posted on 2002-07-22
5
1,810 Views
Last Modified: 2012-06-27
Can any one tell me how do we insert a CRLF from inside the vi in a text file ?!!!


Thanks in advance.
0
Comment
Question by:srinusimhadri
5 Comments
 
LVL 38

Expert Comment

by:yuzh
Comment Utility
try to use:

   CTRL-v CTRL char,

   eg, for change to new page, type in:
       Ctrl v Ctrl L (hold ctrl and press v, hold ctrl press l)
       for CR:
       Ctrl v Ctrl m

       it depends on your UNIX favour.

0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 100 total points
Comment Utility
CRLF: Ctrl-V Return Return
or:   Ctrl-V Ctrl-M Ctrl-V Ctrl-J
# depends on your stty settings
0
 

Author Comment

by:srinusimhadri
Comment Utility
is there no way we can tell vi to use CRLF for line breaks ?
0
 
LVL 51

Expert Comment

by:ahoffmann
Comment Utility
depends on your vi version.
traditional AT&T vi does not produce useless characters (CR:-).
But most vi clones have a

     :set textmode

if not, you need to use the UNIX's prorietary unix2dos converter (the name varies on UNIX flaviours), or use a simple tr or perl command.
0
 
LVL 20

Expert Comment

by:tfewster
Comment Utility
No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- Answered by ahoffmann

Please leave any comments here within the next 7 days

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

tfewster
Cleanup Volunteer
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now