title: How to write a bash function that invokes a grep command with constructed fileName parameter
body: <p>I would like to create a bash function that calls the well known <code>grep</code> command. This function should take the grep pattern as a parameter.</p>
  
  <p>Now comes the tricky part. The function itself constructs the fileName parameter given to the <code>grep</code> command. Upon calling the function it seems that the <code>grep</code> command is being called but there is absolutely no output to the console. Here is what I have come up with so far:</p>
  
  <pre><code>specialGrep() {
      evaluatedFileNamePart=$(someOtherGrepCommandThatEvaluatesAnotherPartOfThePath)
  
      # take function param as pattern and use constructed filename param
      grep -i '${1}' /fixedPathPart1/"$evaluatedFileNamePart"/fixedPathPart2/*.*
  }
  </code></pre>
  
  <p>What's wrong here?</p>