Tuesday, December 18, 2012

bash 스크립트 내에서 스크립트 자신의 폴더 알아내는 법

다음과 같이 하면 된다.

DIR=$( cd "$( dirname "$0" )" && pwd )
echo $DIR

출처 : Can a Bash script tell what directory it's stored in?
키워드 : Perl, 디렉토리, folder

No comments:

Post a Comment