Edlin: i (insert)

Inserts lines before the line number you specify in the edited file residing in memory. Used without parameters, i starts the insert mode at the current line.

Syntax

i [line]

Parameters

line : Specifies the line number before which you want to insert lines. The default value of line is the number of the current line.

Remarks

Windows XP does not use this command. It is accepted only for compatibility with MS-DOS files. 

This tool is not available on Windows XP 64-Bit Edition. 

Using the i subcommand

If you are creating a new file, you must type the i command before you can insert a new line. Edlin.exe displays the next line number each time you press ENTER. To quit insert mode, press CTRL+C.

Renumbering lines

When you quit insert mode, the line immediately following the inserted lines becomes the current line. You can use the l (list) subcommand at the * prompt to see the correctly renumbered lines.

Inserting control characters

To insert a control character in text, type:

^V ASCIIsymbol

ASCIIsymbol is the ASCII symbol that represents the control character. For example, to insert an escape character (CTRL+[), type:

^V[

To insert a character that produces a tone (CTRL+G), type:

^VG

Appending text

If the value for line exceeds the number of lines in the file you are editing or if you specify a number sign (#) for line, Edlin.exe appends the inserted line or lines to the end of the file. In either case, the last line you insert becomes the current line. If only a portion of the file is in memory, the line is appended at the end of the portion in memory.

Examples

The following text appears on your screen after you use the l (list) subcommand:

1: Dear Mr. Muth: 
2: 
3: Congratulations on your promotion 
4: to the position of Senior Chemical 
5: Engineer. I continue to be most 
6: impressed with your work. 
7: 
8: Sincerely, 
9: 
10: Clay Martin, President 

To insert text before line 8, type:

8I

Edlin.exe displays the following:

8:*_

Type the following line at the insertion point on line 8:

8:*I think you will enjoy working with 

Press ENTER at the completion of each new line and type:

9:

 *Mr. Lang on the new project. Please
10: *let me know if there is anything I
11: *can do to assist you.

Edlin.exe displays the following:

12:*_

Insert a blank line by pressing ENTER and complete the insertion by pressing CTRL+C on the next line. Type 1l to see the following correctly renumbered lines:

1: Dear Mr. Muth: 
2: 
3: Congratulations on your promotion 
4: to the position of Senior Chemical 
5: Engineer. I continue to be most 
6: impressed with your work. 
7: 
8: I think you will enjoy working with 
9: Mr. Lang on the new project. Please 
10: let me know if there is anything I 
11: can do to assist you. 
12: 
13:*Sincerely, 
14: 
15: Clay Martin, President 

Formatting legend

FormatMeaning

Italic

Information that the user must supply

Bold

Elements that the user must type exactly as shown

Ellipsis (...)

Parameter that can be repeated several times in a command line

Between brackets ([])

Optional items

Between braces ({}); choices separated by pipe (|). Example: {even|odd}

Set of choices from which the user must choose only one

Courier font

Code or program output

Edlin

Edlin subcommands

Command-line reference A-Z



© 2014 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies