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