Answers for "bash remove trailing slash"

0

bash remove trailing slash

VALUE=/looks/like/a/path///

TRIMMED=$(echo $VALUE | sed 's:/*$::')

echo $VALUE $TRIMMED
Posted by: Guest on October-17-2021

Code answers related to "bash remove trailing slash"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language