确认行删除
我创建了一个函数来搜索文件中的所有双行。
我使用“行号”g/.*/d 来删除该行。
不过我想确认是否需要删除一行, 像s/..//gc命令
是否可以用全局或替换删除某一行
命令并确认每一个动作?
I have created a function to search all double lines in a file.
I use the "line-number"g/.*/d to delete the line.
However I would like to confirm if a line has to be deleted or not,
like the s/..//gc command
Is it possible to delete a certain line with the global or substitute
command and confirm every action?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
为什么不尝试使用替代命令而不是删除命令呢?
Why not try a substitute command instead of the delete command?
如果我想删除文件中的行并确认每一行,我会:
dd
n
搜索下一行code>.
,否则再次按n
If I wanted to delete lines in a file and confirm each one, I would:
dd
n
.
, elsen
again