the first (digital) forms signed on the quest of starting my own company, now the waiting begins
Don’t quote regex patterns in Bash [[ ]] tests, because they’ll match literally.
So the below won’t match because it’s looking for a literal $ in the string,
instead of matching at the end of the string:
file="https://example.com/blog-post/index.html"
[[ "$file" =~ "/index.html$" ]] && echo MATCHBut this will:
file="https://example.com/blog-post/index.html"
[[ "$file" =~ /index\.html$ ]] && echo MATCHNote: [[ ]] is a Bash extension of the test command that supports regexes (among other things).
The [ ] is the POSIX standard test (see man test),
so [[ ]] features may not work in other shells or in limited shells like ash or sh.