projects
/
platform
/
upstream
/
bash.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git]
/
tests
/
exp5.sub
1
# expansions involving patterns
2
3
var='[hello'
4
echo "${var//[/}"
5
6
red='\[\e[0;31m\]'
7
echo "${red//\\[\\e/}"
8
9
foo="${red//\\[\\e/}"
10
11
# foo == [0;31m\]
12
echo "${foo//[0;31m\\/}"
13
14
echo "${var//[]/}"
15
echo "${red//[]/}"
16
17
v=hello
18
foo='[:alpha:]'
19
20
echo ${v//[[:alpha:]]/}
21
echo ${v//[[:alpha]]/}
22
echo ${v//[[:alpha]/}