Answers for "remove slash from string shell script"

1

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 "remove slash from string shell script"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language