John Kings
John Kings

Reputation: 49

Remove Left and right square brackets using sed/bash

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' {} +

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

Upvotes: 1

Views: 687

Answers (1)

midori
midori

Reputation: 4837

If i understood you correctly this command should help:

sed -i 's/\[Contributor\]//g'

Upvotes: 3

Related Questions