Skip to content

Instantly share code, notes, and snippets.

@sprohaszka
Created August 25, 2010 17:27
Show Gist options
  • Save sprohaszka/549910 to your computer and use it in GitHub Desktop.
Save sprohaszka/549910 to your computer and use it in GitHub Desktop.
replace string in files
#!/bin/bash
for file in *.groovy
do
echo "Traitement de $file ..."
sed -e "s/string1/string2/g" "$file" > "$file".tmp && mv -f "$file".tmp "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment