Created
September 10, 2013 07:34
-
-
Save hellojinjie/6506126 to your computer and use it in GitHub Desktop.
神奇的一段 shell 代码用来判断当前脚本所在的位置,从 hadoop 的启动脚本里复制过来的
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
this="${BASH_SOURCE-$0}" | |
dir=$(cd -P -- "$(dirname -- "$this")" && pwd -P) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment