我有一个 url 变量,我想在 bash 中替换该 url 的一部分,但我不断收到“错误替换”
URL="http://hostname/project/branches/Old_Branch/package"
SRC="Old_Branch"
REP="New_Branch"
echo ${$URL/$SRC/$REP};
# desired output is http://hostname/project/branches/New_Branch/package
不知道我到底哪里错了......