Remove matching from a string in bash

Remove matching from a string in bash

  • 2020-2-12
1
2
3
output="_post/README.md"
file_name=${output#*_posts/} # will remove _post/
echo $file_name # README.md