DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR SHELL
bash remove trailing slash
VALUE=/looks/like/a/path/// TRIMMED=$(echo $VALUE | sed 's:/*$::') echo $VALUE $TRIMMED
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#bash
#remove
#trailing
#slash
ADD COMMENT
Topic
COMMENT
Name
2+9 =
Submit