SyntaxFix
Write A Post
Hire A Developer
Questions
I use grep for removing prefixes from paths (which aren't handled well by sed):
sed
echo "$input" | grep -oP "^$prefix\K.*"
\K removes from the match all the characters before it.
\K