bash - how to return values from a bash function
What I wanted to do was to set a variable in bash from a function. Not as easy as I would have hoped.
Returning values from bash functions
Here is the choice I used from the article:
The other way to return a value is to write your function so …