Strings In Depth12 / 17
Up next

Strip a prefix

#!/usr/bin/env bash
path="src/main/app.sh"
# # removes the shortest leading match, ## the longest
echo "${path#*/}"
echo "${path##*/}"
What you're solving

${s#pattern} removes a leading match