Functions
function <funct-name> {
commands
[return [n]]
}
<funct-name> [arguments]
Examplesfunction print_value {
echo "$1"
}
print_value "hello"
function print_value { echo $1; }; for var in one two three; do print_value $var; done
Resources URL:
notes/bash/resources
Sources URL:
notes/bash/sources