mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
use ^ in sed as delimiter and make sub global.
This commit is contained in:
parent
30ac4f6fed
commit
5a2cae9576
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ replaceVarBy() {
|
||||||
if [ -n "${BASH_VERSION}" ]; then
|
if [ -n "${BASH_VERSION}" ]; then
|
||||||
REPLACEDRESULT="${1/${2}/${3##*/}}" # get last part after slash for paths
|
REPLACEDRESULT="${1/${2}/${3##*/}}" # get last part after slash for paths
|
||||||
else
|
else
|
||||||
REPLACEDRESULT=$(echo "${1}" | sed "s/${2}/${3##*/}/") # get last part after slash for paths
|
REPLACEDRESULT=$(echo "${1}" | sed "s^${2}^${3}^g")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: replace result: ${REPLACEDRESULT}" ; fi
|
if [ "$Debug" = "yes" ]; then echo "[DETAIL] Post-Process: replace result: ${REPLACEDRESULT}" ; fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue