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