Open Vim from within a Bash shell script

后端 未结 5 1761
臣服心动
臣服心动 2021-02-01 07:24

I want to write a Bash shell script that does the following:

  1. Opens a file using Vim;
  2. Writes something into the file;
  3. Saves the file and exits.
5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-01 08:04

    Recently, I have answered a similar question, “Automated editing of several files in Vim”. May be the solution that I describe there will satisfy your needs.

提交回复
热议问题