I'd like to return a string from a bash function.
I'll write the example in java to show what I'd like to do:
public String getSomeString() { return "tadaa"; } String variable = getSomeString();
The example below works in bash, but is there a better way to do this?
function getSomeString { echo "tadaa" } VARIABLE=$(getSomeString)