#!/bin/bash
function getfullpath ()
{
local dir=$(dirname $1)
local base=$(basename $1)
if test -d ${dir}; then
pushd ${dir} >/dev/null 2>&1
echo ${PWD}/${base}
popd >/dev/null 2>&1
return 0
fi
return 1
}
getfullpath ./shell
linux shell 相对路径转化为绝对路径
最新推荐文章于 2025-01-12 23:24:39 发布