Case insensitive matching
suggest changePreparation
$ mkdir globbing
$ cd globbing
$ mkdir -p folder/{sub,another}folder/content/deepfolder/
touch macy stacy tracy "file with space" folder/{sub,another}folder/content/deepfolder/file .hiddenfile
$ shopt -u nullglob
$ shopt -u failglob
$ shopt -u dotglob
$ shopt -u nocaseglob
$ shopt -u extglob
$ shopt -u globstar
Setting the option nocaseglob
will match the glob in a case insensitive manner
$ echo M*
M*
$ shopt -s nocaseglob
$ echo M*
macy
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents