Search
 
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
Name
2+9 =