Created
March 3, 2012 09:00
-
-
Save xergio/1965054 to your computer and use it in GitHub Desktop.
Pasar un proyecto a utf-8
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 | |
cd proyecto | |
# paso los originales a utf8 en archivos .utf8 | |
for a in $(find . -name "*.php"); do iconv -f iso-8859-1 -t utf-8 <"$a" >"$a.utf8" ; done | |
# muevo los originales a .iso | |
for a in $(find . -name "*.php"); do mv "$a" "$a.iso" ; done | |
# muevo los .utf8 a originales | |
for a in $(find . -name "*.php.utf8"); do mv "$a" "${a%.*}" ; done | |
#for a in $(find . -name "*.php.iso"); do rm "$a" ; done | |
echo "done!!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment