DOS命令大全:Edlin:i (insert)命令详解
3952 点击·0 回帖
![]() | ![]() | |
![]() | 在所编辑的驻留内存的文件中指定的行号前插入行。如果不指定参数,i 将在当前行启动插入模式。 MS-DOS命令语法 i [line] MS-DOS命令参数 line指定要在其前面插入行的行号。line 的默认值是当前行号。MS-DOS命令注释 使用 i 子命令如果创建新文件,请务必在插入新行之前输入 i 命令。每次按 ENTER 时,Edlin.exe 会显示下一行的行号。要退出插入模式,请按 CTRL+C。 为行重编号。在退出插入模式时,插入行后接的行将成为当前行。可以在 * 提示符下使用 l (list) 子命令查看正确重编号的行。 插入控制字符要在文本中插入控制符,请键入: ^V ASCIIsymbol ASCIIsymbol 是代表控制符的 ASCII 符号。例如,要插入转义字符 (CTRL+[),请键入: ^V[ 要插入产生语音的字符 (CTRL+G), 请键入: ^VG 附加文本如果 line 的值超过了正在编辑的文件中的行数或如果为 line 指定数字符 (#),Edlin.exe 将插入的一行或多行附加到文件的末尾。在任何情况下,插入的最后一行成为当前行。如果文件只有一部分在内存,则会将行附加到内存中文件部分的末尾。 MS-DOS命令范例 使用 l (list) 子命令后,屏幕上会出现如下文本: 1: Dear Mr. Muth: 2: 3: Congratulations on your promotion 4:to the position of Senior Chemical 5:EngineerI continue to be most 6:impressed with your work. 7: 7: 8: Sincerely, 9: 10: Clay Martin, President 要将文本插入第 8 行之前,请键入: 8I Edlin.exe 显示如下: 8:*_ 在第 8 行的插入点键入如下行: 8:*I think you will enjoy working with 每个新行完成时按 ENTER 键,并键入: 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 显示如下: 12:*_ 按 ENTER 键插入一个空行,在下一行中按 CTRL+C 完成同样的插入。键入 1l 以查看下列正确重编号的行: 1: Dear Mr. Muth: 2: 3: Congratulations on your promotion 4:to the position of Senior Chemical 5:EngineerI continue to be most 6:impressed with your work. 7: 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. 13:*Sincerely, 14: 15: Clay Martin, President | |
![]() | ![]() |