Linux Ed Command

Source: Internet
Author: User

$ ed              <- 激活 ed 命令  a                 <- 告诉 ed 我要编辑新文件  My name is Titan. <- 输入第一行内容  And I love Perl very much. <- 输入第二行内容  .                 <- 返回 ed 的命令行状态  i                 <- 告诉 ed 我要在最后一行之前插入内容  I am 24.          <- 将“I am 24.”插入“My name is Titan.”和“And I love Perl very much.”之间  .                 <- 返回 ed 的命令行状态  c                 <- 告诉 ed 我要替换最后一行输入内容  I am 24 years old. <- 将“I am 24.”替换成“I am 24 years old.”(注意:这里替换的是最后输的内容)  .                 <- 返回 ed 的命令行状态  w readme.text     <- 将文件命名为“readme.text”并保存(注意:如果是编辑已经存在的文件,只需要敲入 w 即可)  q                 <- 完全退出 ed 编辑器

Linux Ed Command

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.