title: Bash: using sed with a variable line number, and variables in the line replacement
body: <p>So I have seen this question: <a href="https://stackoverflow.com/questions/26023170/replace-complete-line-getting-number-from-variable">Replace complete line getting number from variable</a>
  which is pretty similar, but in my case I am trying to use multiple variables: one for the line number [lineNo], one for the text to replace [transFormatted] and the file to which it should be looking in [OUTPUT_FILE] I've tried dozens of combinations to try to get it to recognize all these variables but nothing seems to work. It's unhappy no matter which way I try. What am I doing wrong?</p>
  
  <pre><code>sed -e '${lineNo}s/.*/${transFormatted}/' &lt; $OUTPUT_FILE
  </code></pre>