Regular expressions (Bash)
Versie door Jeroen Strompf (overleg | bijdragen) op 29 sep 2022 om 12:45
To use regular expressions in Bash comparisons, use operator =~
, like
if [[ "$switches" =~ [f] ]]; then echo "f - Create folder structure" mappenstructuur=true fi
I have the impression that regular expressions (regex) in Bash may not be the same as in MySQL, hence some more details in this article.