Forward function declarations in a Bash or a Shell script?
13. 8. 20192nd answer looks interesting
#!/bin/bash
main() {
foo
bar
baz
}
foo() {
}
bar() {
}
baz() {
}
main "$@"
Purpuse is to have interesting main logic at the top of the script and boring fat functions at the bottom.