variable

Bash GLOBIGNORE — exclude pathname matches

Colon-separated patterns remove matching names from pathname expansion. A nonempty value enables dotglob behavior; . and .. are not matched when it is nonempty. Unsetting GLOBIGNORE disables dotglob. This affects filename expansion, not arbitrary string filtering. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): .hidden; a.txt.

Formal Syntax & Structure

bash syntaxbash
${GLOBIGNORE}

Return Value

string

Current value of the variable; expansion does not independently return an exit status.

Working Example

Example Snippetbash
mkdir datacd data || exit 1touch a.txt b.tmp .hiddenGLOBIGNORE='*.tmp'printf '%s\n' *unset GLOBIGNORE
Bash Reference