help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Best way to remove trailing '/' from a path?


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]