How to Make Bash Function Return Value
By default, functions in bash do not return value. There are a couple of workarounds that may help to some extent.
With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world