diff --git a/README.md b/README.md index 6718ce2..814ceb6 100644 --- a/README.md +++ b/README.md @@ -1105,7 +1105,7 @@ basename() { tmp=${1%${1##*[!/]}} tmp=${tmp##*/} - tmp=${tmp%"${2/$tmp}"} + tmp=${tmp%"${2/"$tmp"}"} printf '%s\n' "${tmp:-/}" } diff --git a/manuscript/chapter5.txt b/manuscript/chapter5.txt index 717369d..4be6b11 100644 --- a/manuscript/chapter5.txt +++ b/manuscript/chapter5.txt @@ -44,7 +44,7 @@ basename() { tmp=${1%${1##*[!/]}} tmp=${tmp##*/} - tmp=${tmp%"${2/$tmp}"} + tmp=${tmp%"${2/"$tmp"}"} printf '%s\n' "${tmp:-/}" }