```addr="${addr%%+(/)}" # strip trailing slash``` requires the globbing shell option ``shopt -s extglob``
addr="${addr%%+(/)}" # strip trailing slashrequires the globbing shell option
shopt -s extglob