shopt-option
nocasematch
Case-insensitive conditional and case pattern matching and pattern replacement; independent of nocaseglob filename matching.
Formal Syntax & Structure
bash syntaxbash
shopt -s nocasematchReturn Value
exit status
Case-insensitive conditional and case pattern matching and pattern replacement; independent of nocaseglob filename matching.
Working Example
Example Snippetbash
touch REPORT.TXTshopt -s nocasematch[[ REPORT.TXT == *.txt ]] && printf 'conditional=yes\n'shopt -u nocaseglobprintf 'glob-off=%s\n' *.txtshopt -s nocaseglobprintf 'glob-on=%s\n' *.txt