linux - How to save another configuration file in the shell.
怪我咯
怪我咯 2017-05-16 13:22:42
0
3
672

1. How to write in the shell:
Save the vim configuration file
For example, if a file is called abc.conf
To write in the shell:
vim /abc.conf
i How to save and exit after key insertion and modification
(not directly wq/ZZ in vim)

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(3)
伊谢尔伦

If you want to modify it through script/abc.conf, 那就别用vim, 可以尝试下sed/awk, if necessary, you can describe the problem in more detail and I can provide the corresponding statement

曾经蜡笔没有小新

echo "Content to be inserted" >>/abc.conf This will directly append content to the file.

世界只因有你

Vim is interactive, and the shell script is a new shell. How do you open an interactive editor in a new shell? . . You should just use sed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template