[Linux]vi中使用shell

:!ls  – 执行一下ls

:r ! ls – 执行一下ls,并把ls的输出插入到当前位置

:r 3.txt – 把3.txt文件的内容插入到当前位置

:sh 暂停vi,创建一个新的shell并进入(完成后输入exit回到vi)

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.