Skip to content

Instantly share code, notes, and snippets.

@iandark
Created June 12, 2022 14:14
Show Gist options
  • Select an option

  • Save iandark/c11825dbc6b58fcdd8592d7ad2e572f4 to your computer and use it in GitHub Desktop.

Select an option

Save iandark/c11825dbc6b58fcdd8592d7ad2e572f4 to your computer and use it in GitHub Desktop.
shell - replace text inside multiple files
#!/bin/bash
for f in *.extensionFile; do
sudo sed -i 's/old-text/new-text/g' "$f"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment