Ron Yorston | 95ebcf7 | 2015-11-03 09:42:23 +0000 | [diff] [blame] | 1 | function f() { echo $1; } |
2 | f 1 | ||||
3 | |||||
4 | function f() ( echo $1; ) | ||||
5 | f 2 | ||||
6 | |||||
7 | function f() ( echo $1 ) | ||||
8 | f 3 | ||||
9 | |||||
10 | function f() for i in 1 2 3; do | ||||
11 | echo $i | ||||
12 | done | ||||
13 | f | ||||
14 | |||||
15 | function f { echo $1; } | ||||
16 | f 1 | ||||
17 | |||||
18 | # the next two don't work | ||||
19 | #function f ( echo $1; ) | ||||
20 | f 2 | ||||
21 | |||||
22 | #function f ( echo $1 ) | ||||
23 | f 3 | ||||
24 | |||||
25 | function f for i in 1 2 3; do | ||||
26 | echo $i | ||||
27 | done | ||||
28 | f |