Skip to content

Instantly share code, notes, and snippets.

@meskarune
Created June 8, 2012 16:13
Show Gist options
  • Save meskarune/2896508 to your computer and use it in GitHub Desktop.
Save meskarune/2896508 to your computer and use it in GitHub Desktop.
Mass File Editing
#!/bin/bash
for file in *.css; do
mv $file $file.old
sed 's/FINDSTRING/REPLACESTRING/g' $file.old > $file
rm -f $file.old
done
@rmartinjak
Copy link

you can use "sed -i" instead of "mv; sed; rm" :)
or as a complete one-liner: sed -i 's/FIND/REPLACE/g' *.css

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment