shell 获取当前脚本的绝对路径
#!/bin/bash
# -*- coding: utf-8 -*-
# @Description : 获取当前脚本的绝对路径
# 获取当前脚本的绝对路径
cur_dir=$(cd "$(dirname "$0")" || exit;pwd)
echo "$cur_dir"
#!/bin/bash
# -*- coding: utf-8 -*-
# @Description : 获取当前脚本的绝对路径
# 获取当前脚本的绝对路径
cur_dir=$(cd "$(dirname "$0")" || exit;pwd)
echo "$cur_dir"