|
From: | Peng Yu |
Subject: | [Help-bash] Best way to remove trailing '/' from a path? |
Date: | Fri, 10 Apr 2015 22:11:37 -0500 |
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? Thanks. http://stackoverflow.com/questions/9018723/what-is-the-simplest-way-to-remove-trailing-slashes-from-each-parameter -- Regards, Peng
[Prev in Thread] | Current Thread | [Next in Thread] |