Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试标准化我的导出文件。我需要删除前两个字段之间的所有空格和制表符,并用两个制表符替换它们。我正在使用VI。
所以我想改变
/vol/vol1/home1/xxx -rw=admin:app:admhosts
至
使空间等于两个 TABS。
我正在使用VI。
:s/[ ^I]\+/^I^I/为单行或:%s/[ ^I]\+/^I^I/整个文件执行。请注意,我^I的意思是您按 Ctrl+I
:s/[ ^I]\+/^I^I/
:%s/[ ^I]\+/^I^I/
^I