Remove Trailing Slash from Variable in Bash

2015-05-13 01:35 (11 years ago)
Remove Trailing Slash from Variable in Bash

Removing the trailing / from $1

${1%/}

Related posts

Please rate this article (No signup or login required)
Currently unrated
The author runs the application development company Cyberneura.
We look forward to discussing your development needs.

Categories

Archive