]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/builtins6.sub
Bash-4.4 distribution sources and documentation
[thirdparty/bash.git] / tests / builtins6.sub
CommitLineData
a0c0a00f
CR
1f1()
2{
3 echo f1
4}
5
6f2()
7{
8 echo f2
9}
10
11v1=one
12v2=two
13
14echo all set:
15
16echo ${v1-unset1}
17echo ${v2-unset2}
18
19declare -f -p f1 f2
20
21unset v1 f1 v2 f2
22
23echo all unset:
24
25echo ${v1-unset1}
26echo ${v2-unset2}
27
28declare -f -p f1 f2
29
30f1()
31{
32 echo f1
33}
34
35f2()
36{
37 echo f2
38}
39
40v1=one-one
41v2=two-one
42
43echo all reset:
44echo ${v1-unset1}
45echo ${v2-unset2}
46
47declare -f -p f1 f2
48
49unset -v v1 f1 v2 f2
50
51echo vars unset:
52
53echo ${v1-unset1}
54echo ${v2-unset2}
55
56declare -f -p f1 f2
57
58v1=one-two
59v2=two-two
60
61unset -f v1 f1 v2 f2
62
63echo funcs unset:
64
65echo ${v1-unset1}
66echo ${v2-unset2}
67
68declare -f f1 f2