使用sed/bash删除左右方括号 [英] Remove Left and right square brackets using sed/bash
本文介绍了使用sed/bash删除左右方括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个字符为 [Contributor]
的文件.即贡献者和勇士们在一起
I have a file with this character [Contributor]
. I.e the contributor and the bracess all together
我需要使用以下代码将其删除:
I need to remove it using the code below:
find . -type f -exec sed -i 's@ [Contributor]@@g' {} +
任何想法,我如何结合find和sed来实现.或其他任何想法.必须除去开括号和闭括号以及贡献者一词谢谢
Any Idea how I might achive this with find and sed combined. Or any other idea. the open and closed braces must be removed as well as the word contributor Thanks
推荐答案
如果我对您的理解正确,那么此命令应该可以帮助您
If i understood you correctly this command should help:
sed -i 's/\[Contributor\]//g'
这篇关于使用sed/bash删除左右方括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文