]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/exp5.sub
Bash-5.0 patch 11: fix quoted null character removal in operands of conditional ...
[thirdparty/bash.git] / tests / exp5.sub
1 # expansions involving patterns
2 var='[hello'
3 echo "${var//[/}"
4
5 red='\[\e[0;31m\]'
6 printf "%s\n" "${red//\\[\\e/}"
7
8 foo="${red//\\[\\e/}"
9
10 # foo == [0;31m\]
11 printf "%s\n" "${foo//[0;31m\\/}"
12
13 echo "${var//[]/}"
14 echo "${red//[]/}"
15
16 v=hello
17 foo='[:alpha:]'
18
19 echo ${v//[[:alpha:]]/}
20 echo ${v//[[:alpha]]/}
21 echo ${v//[[:alpha]/}