title: Bash: Return a string from bash function
body: <p>I need a bash function to return a dynamically constructed string to returned to the caller space.
  i.e,</p>
  
  <pre><code>makeName()
  {
      echo "Enter Ext: "
      read ext
      return "$fileName.$1.$ext.log"
  }
  
  
  echo -n "Enter fileName:"
  read fileName
  
  name1=makeName "type1"
  name2=makfName "type2"
  </code></pre>
  
  <p>So I can get two different filenames with same base file name.
  I tries doing like this,</p>
  
  <pre><code># echo $(makeName "type1")
  </code></pre>
  
  <p>But this code is struck somewhere with out any reason or error. I expect it to accept some kind of I/O with that proc also. That is not happening.</p>