3
# \] is not a valid escape for ] in set glob expression.
4
# Glob sets have no escaping at all:
5
# ] can be in a set if it is the first char: []abc],
6
# dash can be in a set if it is first or last: [abc-],
7
# [ and \ need no protections at all: [a[b\c] is a valid set of 5 chars.
9
# bash-4.3.43 misinterprets [a\]] as "set of 'a' or ']'".
10
# Correct interpretation is "set of 'a' or '\', followed by ']'".
12
echo Nothing:${x#[a\]]}
13
echo Nothing:"${x#[a\]]}"
14
echo Nothing:${x%[a\]]}
15
echo Nothing:"${x%[a\]]}"