이 파일을 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
13년 전
감사합니다.
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4041 | |
| 29 |
아우겐나이스
|
21년 전 | 4432 | |
| 28 |
아우겐나이스
|
21년 전 | 3455 | |
| 27 | 21년 전 | 5821 | ||
| 26 | 21년 전 | 3093 | ||
| 25 | 21년 전 | 6071 | ||
| 24 | 18년 전 | 3642 | ||
| 23 | 21년 전 | 3629 | ||
| 22 | 21년 전 | 4240 | ||
| 21 | 21년 전 | 3812 | ||
| 20 | 21년 전 | 4213 | ||
| 19 | 21년 전 | 6673 | ||
| 18 | 21년 전 | 4731 | ||
| 17 | 21년 전 | 6981 | ||
| 16 | 21년 전 | 4165 | ||
| 15 | 21년 전 | 2622 | ||
| 14 | 21년 전 | 4963 | ||
| 13 | 21년 전 | 3395 | ||
| 12 |
Recluse
|
21년 전 | 3869 | |
| 11 |
아우겐나이스
|
21년 전 | 3566 | |
| 10 |
Recluse
|
21년 전 | 3388 | |
| 9 | 21년 전 | 3976 | ||
| 8 | 21년 전 | 5156 | ||
| 7 | 21년 전 | 4753 | ||
| 6 | 21년 전 | 5672 | ||
| 5 | 21년 전 | 4108 | ||
| 4 | 21년 전 | 4826 | ||
| 3 | 21년 전 | 4735 | ||
| 2 | 21년 전 | 3232 | ||
| 1 | 22년 전 | 4335 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기