shopt-option
Bash shopt globasciiranges
Makes pattern bracket ranges use traditional ASCII ordering independently of locale collation. Literal matching and character classes are separate concepts. The fixture verifies a simple range under LC_ALL=C; non-C locale differences are not measured. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): range matched; disabled-status=1.
Formal Syntax & Structure
bash syntaxbash
shopt -s globasciiranges; shopt -u globasciiranges; shopt -q globasciirangesReturn Value
exit status
Option-setting command returns zero for a valid request; query status is zero if enabled, one if disabled.
Working Example
Example Snippetbash
shopt -s globasciiranges[[ B == [A-Z] && b != [A-Z] ]] || exit 1printf 'range matched\n'shopt -u globasciirangesshopt -q globasciirangesprintf 'disabled-status=%s\n' "$?"