post image :date_long | 1 min Read

How to replace text in lots of file via sed and find

I have recently decided to change the way how my code blocks look like at this blog. This was rather straightforward change. I needed to exchange “bash" to "”.

Here is an easy way how this can be achieved via find and sed.

find content/english -type f -name '*.md' -exec sed -i '' -e 's|\`\`\`bash|\`\`\`|g' {} +
author image

Jan Toth

I have been in DevOps related jobs for past 6 years dealing mainly with Kubernetes in AWS and on-premise as well. I spent quite a lot …

comments powered by Disqus