blob: bb24e2a2f7e411ea36f9c7af0c13b16311b878c7 [file] [log] [blame]
v='*.z'
[[ a.z = *.z ]]; echo 1:YES:$?
[[ a.z == $v ]]; echo 2:YES:$?
# wildcards can match a slash
[[ a/b = a*b ]]; echo 3:YES:$?
[[ a/b == a?b ]]; echo 4:YES:$?
# wildcards can match a leading dot
[[ a/.b = a/*b ]]; echo 5:YES:$?
[[ a/.b == a/?b ]]; echo 6:YES:$?
# wildcards can be escaped
[[ abc = a*c ]]; echo 7:YES:$?
[[ abc == a\*c ]]; echo 8:no:$?