需要空格,tab,新行以顺序排列,放置编辑器出现关于space-tab兼容性问题。如果调用_AS_PATH_WALK时IFS没有设置,将会通过将IFS设置为空值,关闭word splitting。

1 as_nl='
2 '
3 IFS=" "" $as_nl"

查找出运行该脚本的用户

# Find who we are.  Look in the path if we contain no directory separator.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
IFS=$as_save_IFS

;;

​$0​​当前脚本的文件名

如果没有发现用户,可能是通过sh COMMAND运行的

if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
{ (exit 1); exit 1; }
fi