|
| From: | Chris F.A. Johnson |
| Subject: | Re: [Help-bash] Best way to remove trailing '/' from a path? |
| Date: | Fri, 10 Apr 2015 23:44:43 -0400 (EDT) |
| User-agent: | Alpine 2.10 (DEB 1266 2009-07-14) |
On Fri, 10 Apr 2015, Peng Yu wrote:
Hi, ${VAR%%+(/)} has been suggested here. But it is not robust if $VAR
is just a bunch of slashes. Does anybody have a robust yet succinct
implementation?
${var%/}
--
Chris F.A. Johnson, <http://cfajohnson.com>
| [Prev in Thread] | Current Thread | [Next in Thread] |