删除vi中的重复行? [英] Removing duplicate rows in vi?
本文介绍了删除vi中的重复行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
如果可以对文件进行排序,您可以使用:
:sort u
I have a text file that contains a long list of entries (one on each line). Some of these are duplicates, and I would like to know if it is possible (and if so, how) to remove any duplicates. I am interested in doing this from within vi/vim, if possible.
解决方案
If you're OK with sorting your file, you can use:
:sort u
这篇关于删除vi中的重复行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文