Is there such a thing in bash or at least something similar (work-around) like forward declarations, well known in C / C++, for instance?
bash
Or there is so
When my bash scripts grow too much, I use an include mechanism:
File allMyFunctions:
allMyFunctions
foo() { } bar() { } baz() { }
File main:
main
#!/bin/bash . allMyfunctions foo bar baz