Case-insensitive Glob on zsh/bash

Agnel Kurian picture Agnel Kurian · Oct 1, 2008 · Viewed 13.3k times · Source

I need to list all files whose names start with 'SomeLongString'. But the case of 'SomeLongString' can vary. How?

I am using zsh, but a bash solution is also welcome.

Answer

Jacek Szymański picture Jacek Szymański · Oct 1, 2008

bash:

shopt -s nocaseglob