BASENAME …string-expr…
STRING -> STRING
Similar to the UNIX tool basename, this removes from the passed operand everything before the last slash ('/'), to keep only the filename portion of a path.
Does nothing if the operand contains no slash.
| expression | evaluates to |
|---|---|
| BASENAME "/foo/bar/baz" | "baz" |
| BASENAME "foo" | "foo" |