~emersion/mrsh

ref: fd9074d7cc205c7bf53940b59ed5eec2d5827c0a mrsh/test/function.sh -rw-r--r-- 239 bytes
fd9074d7Drew DeVault Initial implementation of functions 3 years ago
                                                                                
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
29
#!/bin/sh -e
func_a() {
	echo func_a
}

func_b() {
	echo func_b
}

func_b() {
	echo func_b revised
}

func_c() {
	echo func_c

	func_c() {
		echo func_c revised
	}
}

func_a
func_b
func_c
func_c

output=$(func_a)

[ "$output" = "func_a" ]