Skip to content

Instantly share code, notes, and snippets.

@hosszukalman
Created September 17, 2019 08:00
Show Gist options
  • Save hosszukalman/a94e89e89898875a410bae39c9907eba to your computer and use it in GitHub Desktop.
Save hosszukalman/a94e89e89898875a410bae39c9907eba to your computer and use it in GitHub Desktop.
Replace files content based on regex
#!/bin/bash
find . -type f -regex '.*-romanian.html' -exec sed -i '' -e 's/language: en/language: ro/g' {} \;
find . -type f -regex '.*-romanian.html' -exec sed -i '' -e 's/-english/-romanian/g' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment