이 파일을 e2u.sh 라는 파일로 만든 후 퍼미션에 실행권한을 준다.
#!/bin/bash
iconv -c -f euc-kr -t utf-8 $1 > $1.tmp && mv $1.tmp $1
$> for i in `find . \( -name '*.php' -o -name '*.htm' -o -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.sql' -o -name '*.txt' \) -print` ; do ./e2u.sh $i ; done
쉘에서 이 명령을 실행하면 하위 폴더까지 전부 charset 을 변환한다.
[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]
댓글 7개
16년 전
좋은정보 감사합니다
16년 전
우왕굳
16년 전
euckr2utf8.sh 도 있네요.
http://kc99.tistory.com/674
find . -type f -name "*.php" -or -name "*.html" -or -name "*.htm" -or -name "*.css" -or -name "*.js" -or -name "*.txt" | while read srcfile; do
cp ${srcfile} ${srcfile}.bak
iconv -c -f euc-kr -t utf-8 ${srcfile}.bak > ${srcfile}
rm ${srcfile}.bak
done
http://kc99.tistory.com/674
find . -type f -name "*.php" -or -name "*.html" -or -name "*.htm" -or -name "*.css" -or -name "*.js" -or -name "*.txt" | while read srcfile; do
cp ${srcfile} ${srcfile}.bak
iconv -c -f euc-kr -t utf-8 ${srcfile}.bak > ${srcfile}
rm ${srcfile}.bak
done
haejuksun
14년 전
잘 되네요. ^^ 고맙습니다.
15년 전
좋은 정보입니다. 감사합니다..
14년 전
좋은 정보 감사합니다 ^^
techer
14년 전
감사합니다.
게시판 목록
팁게시판
디자인과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 77 | 21년 전 | 2938 | ||
| 76 | 21년 전 | 6233 | ||
| 75 | 21년 전 | 4478 | ||
| 74 | 21년 전 | 5771 | ||
| 73 | 21년 전 | 3657 | ||
| 72 | 21년 전 | 5968 | ||
| 71 | 21년 전 | 3124 | ||
| 70 | 21년 전 | 2846 | ||
| 69 | 21년 전 | 2656 | ||
| 68 | 21년 전 | 2463 | ||
| 67 | 21년 전 | 2668 | ||
| 66 | 21년 전 | 2685 | ||
| 65 | 21년 전 | 3818 | ||
| 64 | 21년 전 | 2824 | ||
| 63 | 21년 전 | 2420 | ||
| 62 | 21년 전 | 2289 | ||
| 61 | 21년 전 | 3060 | ||
| 60 | 21년 전 | 3119 | ||
| 59 | 21년 전 | 2495 | ||
| 58 | 21년 전 | 2583 | ||
| 57 | 21년 전 | 2963 | ||
| 56 | 21년 전 | 2265 | ||
| 55 | 21년 전 | 2737 | ||
| 54 | 21년 전 | 2115 | ||
| 53 | 21년 전 | 2348 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기