summaryrefslogtreecommitdiffhomepage
path: root/shell/ash_test/ash-misc/func_bash1.tests
blob: 2cc0970e8732954ecac038309b5b05e3ba2f1fcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function f() { echo $1; }
f 1

function f() ( echo $1; )
f 2

function f() ( echo $1 )
f 3

function f() for i in 1 2 3; do
	echo $i
done
f

function f { echo $1; }
f 1

# the next two don't work
#function f ( echo $1; )
f 2

#function f ( echo $1 )
f 3

function f for i in 1 2 3; do
	echo $i
done
f