title: Bash script for creating text in a file using arguments
body: <p>Imagine that you have to create many lines in file all with the same text except for one variable:</p>
  
  <pre><code>foo text $variable bar text
  foo text $variable bar text
  foo text $variable bar text
  ...
  </code></pre>
  
  <p>I was wondering if this could be made using a bash script passing it the variable as an argument:</p>
  
  <pre><code>./my_script '1'
  ./my_script '2'
  ./my_script '3'
  </code></pre>
  
  <p>Which would generate this:</p>
  
  <pre><code>foo text 1 bar text
  foo text 2 bar text
  foo text 3 bar text
  </code></pre>
  
  <p>Any suggestions or examples on how to do this?</p>