Bash functions, unlike functions in most programming languages do not allow you to return a value to the caller. When a bash function ends its return value is its status: zero for success, non-zero ...
I seem to recall some sort of mechanism that someone coded in C++ to prevent discarding the return value of a function. But I can't remember what it was, or quite for certain if I'm remembering it ...
Daniel Jassy, CFA, is an Investopedia Academy instructor and the founder of SPYderCRusher Research. He contributes to Excel and Algorithmic Trading. David Kindness is a Certified Public Accountant ...