]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/type.right
bash-5.2 distribution sources and documentation
[thirdparty/bash.git] / tests / type.right
CommitLineData
8868edaf 1./type.tests: line 22: type: -r: invalid option
7117c2d2 2type: usage: type [-afptP] name [name ...]
8868edaf 3./type.tests: line 25: type: notthere: not found
d166f048
JA
4function
5keyword
d166f048
JA
6builtin
7file
8file
cce855bc 9file
d166f048
JA
10func is a function
11func ()
12{
13 echo this is func
14}
15while is a shell keyword
16while is a shell keyword
d166f048
JA
17builtin is a shell builtin
18/bin/sh is /bin/sh
19func
20func is a function
21func ()
22{
23 echo this is func
24}
25while
26while is a shell keyword
8868edaf 27./type.tests: line 56: type: m: not found
b80f6443
JA
28alias m='more'
29alias m='more'
30m is aliased to `more'
31alias
d166f048
JA
32alias m='more'
33alias m='more'
34alias m='more'
35m is aliased to `more'
36builtin
37builtin is a shell builtin
38/bin/sh
39/bin/sh is /bin/sh
8868edaf
CR
40./type.tests: line 78: type: func: not found
41./type.tests: line 80: type: m: not found
d166f048
JA
42/bin/sh
43/tmp/bash
44bash is hashed (/tmp/bash)
cce855bc
JA
45file
46hits command
7117c2d2 47 1 /bin/sh
8868edaf 48 3 /tmp/bash
3185942a
JA
49f is a function
50f ()
51{
52 v='^A'
53}
54foo is a function
55foo ()
56{
74091dd4 57 echo $(< x1)
3185942a
JA
58}
59bar is a function
60bar ()
61{
74091dd4 62 echo $(< x1)
3185942a 63}
0001803f
CR
64foo is a function
65foo ()
66{
67 echo;
d233b485 68 cat <<END
0001803f
CR
69bar
70END
71
d233b485 72 cat <<EOF
0001803f
CR
73qux
74EOF
75
76}
77
78bar
79qux
80
81bar
82qux
495aee44
CR
83foo is a function
84foo ()
85{
86 rm -f a b c;
87 for f in a b c;
88 do
d233b485 89 cat <<-EOF >> ${f}
495aee44
CR
90file
91EOF
92
93 done
94 grep . a b c
95}
96a:file
97b:file
98c:file
ac50fbac
CR
99bb is a function
100bb ()
101{
d233b485 102 ( cat <<EOF
ac50fbac
CR
103foo
104bar
105EOF
106 )
107 echo after subshell
108}
109mkcoprocs is a function
110mkcoprocs ()
111{
112 coproc a {
d233b485 113 cat <<EOF1
ac50fbac
CR
114producer 1
115EOF1
116
117 }
118 coproc b {
d233b485 119 cat <<EOF2
ac50fbac
CR
120producer 2
121EOF2
122
123 }
124 echo "coprocs created"
125}
126mkcoprocs is a function
127mkcoprocs ()
128{
d233b485 129 coproc COPROC ( b cat <<EOF
ac50fbac
CR
130heredoc
131body
132EOF
133 )
134 echo "coprocs created"
135}