shell 疑难

#!/bin/bash
BIN=`which $0`
BIN=`dirname ${BIN}`
BIN=`cd "$BIN"; pwd`  #列出脚本所在目录全局路径

原文地址:https://www.cnblogs.com/hanxing/p/4115097.html