script 썸네일형 리스트형 [Linux] 확장자 변경 쉘스크립트 ls | grep ".html" | cut -d . -f 1 | while read line do echo `ls $line.html` mv $line.html $line.php done 더보기 [Linux] Shell 파일 경로 SCRIPT_PATH=$(dirname $(readlink -f ${BASH_SOURCE[0]})) 요렇게 해줘서 현재 실행중이 shell script의 경로를 받아올 수 있음. 더보기 [Linux] 폴더내 파일 인코딩 바꾸기 # filename: euckr2utf8.sh # usage: ./euckr2utf8.sh source target # made by Heesung SHIN (ensual@gmail.com) # #!/bin/bash recurse () { rm -rf $2 echo make the directory $2 mkdir $2 for file in $(ls $1) do name="$1/$file" echo -n "$2/$file" | iconv -fcp949 -tutf8 -o temp # change the encoding of the name of file for newname in $(cat temp) do if [ -d $name ]; then recurse $name $newname else echo c.. 더보기 이전 1 2 3 다음