]>
Commit | Line | Data |
---|---|---|
7117c2d2 JA |
1 | ./type.tests: line 9: type: -r: invalid option |
2 | type: usage: type [-afptP] name [name ...] | |
3 | ./type.tests: line 12: type: notthere: not found | |
d166f048 JA |
4 | function |
5 | keyword | |
d166f048 JA |
6 | builtin |
7 | file | |
8 | file | |
cce855bc | 9 | file |
d166f048 JA |
10 | func is a function |
11 | func () | |
12 | { | |
13 | echo this is func | |
14 | } | |
15 | while is a shell keyword | |
16 | while is a shell keyword | |
d166f048 JA |
17 | builtin is a shell builtin |
18 | /bin/sh is /bin/sh | |
19 | func | |
20 | func is a function | |
21 | func () | |
22 | { | |
23 | echo this is func | |
24 | } | |
25 | while | |
26 | while is a shell keyword | |
95732b49 | 27 | ./type.tests: line 43: type: m: not found |
b80f6443 JA |
28 | alias m='more' |
29 | alias m='more' | |
30 | m is aliased to `more' | |
31 | alias | |
d166f048 JA |
32 | alias m='more' |
33 | alias m='more' | |
34 | alias m='more' | |
35 | m is aliased to `more' | |
36 | builtin | |
37 | builtin is a shell builtin | |
38 | /bin/sh | |
39 | /bin/sh is /bin/sh | |
95732b49 JA |
40 | ./type.tests: line 65: type: func: not found |
41 | ./type.tests: line 67: type: m: not found | |
d166f048 JA |
42 | /bin/sh |
43 | /tmp/bash | |
44 | bash is hashed (/tmp/bash) | |
cce855bc JA |
45 | file |
46 | hits command | |
cce855bc | 47 | 3 /tmp/bash |
7117c2d2 | 48 | 1 /bin/sh |
3185942a JA |
49 | f is a function |
50 | f () | |
51 | { | |
52 | v='^A' | |
53 | } | |
54 | foo is a function | |
55 | foo () | |
56 | { | |
57 | echo $(<x1) | |
58 | } | |
59 | bar is a function | |
60 | bar () | |
61 | { | |
62 | echo $(<x1) | |
63 | } | |
0001803f CR |
64 | foo is a function |
65 | foo () | |
66 | { | |
67 | echo; | |
68 | cat <<END | |
69 | bar | |
70 | END | |
71 | ||
72 | cat <<EOF | |
73 | qux | |
74 | EOF | |
75 | ||
76 | } | |
77 | ||
78 | bar | |
79 | qux | |
80 | ||
81 | bar | |
82 | qux | |
495aee44 CR |
83 | foo is a function |
84 | foo () | |
85 | { | |
86 | rm -f a b c; | |
87 | for f in a b c; | |
88 | do | |
89 | cat >> ${f} <<-EOF | |
90 | file | |
91 | EOF | |
92 | ||
93 | done | |
94 | grep . a b c | |
95 | } | |
96 | a:file | |
97 | b:file | |
98 | c:file |