我想要连接以下内容:
current_dir=/home/akshay/UCS
source_dir=/lib/python2.7/lib-dynload/
我想要制作这样的东西:
/home/akshay/UCS/lib/python2.7/lib-dynload/
然后我将上述路径设置为LD_LIBRARY_PATH
。
我应该怎么做狂欢脚本?
编辑:到目前为止的脚本:
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo ${current_dir}
# Extract parent directory.
parent_dir="$( dirname ${current_dir} )"
echo ${parent_dir}
source_dir=/lib/python2.7/lib-dynload/
echo "$parent_dir$source_dir"
只给我$parent_dir
回报。
答案1
简单地
current_dir=/home/akshay/UCS
source_dir=/lib/python2.7/lib-dynload/
echo "$current_dir$source_dir"
然后导出
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$current_dir$source_dir