Thursday, February 16, 2012

bash remove trailing slash


STRING=${STRING%/}


Deletes shortest match of a substring (in this case a forward slash) from back of STRING.

No comments:

Post a Comment