Created
February 15, 2015 07:57
-
-
Save mdjnewman/801c5cabfc0477b4596d to your computer and use it in GitHub Desktop.
Simple script to fix encodings from files created with the 'WordPress to Jekyll Exporter' tool
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILES=$(find . -name \*.md) | |
for i in $FILES; do gsed -i "s/–/–/g" $i; done | |
for i in $FILES; do gsed -i "s/\xC2\xA0/ /g" $i; done | |
for i in $FILES; do gsed -i 's/>/>/g' $i; done | |
for i in $FILES; do gsed -i "s/…/…/g" $i; done | |
for i in $FILES; do gsed -i "s/“/“/g" $i; done | |
for i in $FILES; do gsed -i "s/”/”/g" $i; done | |
for i in $FILES; do gsed -i "s/‘/‘/g" $i; done | |
for i in $FILES; do gsed -i "s/’/’/g" $i; done | |
for i in $FILES; do gsed -i "s/(/(/g" $i; done | |
for i in $FILES; do gsed -i "s/)/)/g" $i; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment