Greg Wooledge <wool...@eeg.ccf.org> writes: > Then you are still doing something wrong.
No matter how badly the script is written, bash should execute it properly, which it doesn't. Try running it under valgrind in a multibyte locale and you will see the error immediately: ==18677== Conditional jump or move depends on uninitialised value(s) ==18677== at 0x4504B6: xdupmbstowcs (xmbsrtowcs.c:240) ==18677== by 0x42A43F: remove_pattern (subst.c:3964) ==18677== by 0x42F3B7: parameter_brace_expand (subst.c:4543) ==18677== by 0x466E48: param_expand (subst.c:7651) ==18677== by 0x467C91: expand_word_internal (subst.c:8139) ==18677== by 0x467F24: expand_word_internal (subst.c:8285) ==18677== by 0x42F981: call_expand_word_internal.constprop.15 (subst.c:3197) ==18677== by 0x42FD94: expand_string_assignment (subst.c:3283) ==18677== by 0x466BB3: expand_string_if_necessary (subst.c:3046) ==18677== by 0x47632F: do_assignment_internal (subst.c:2772) ==18677== by 0x469726: expand_word_list_internal (subst.c:2866) ==18677== by 0x45CCB3: execute_simple_command (execute_cmd.c:3776) ==18677== Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."