title: How to replace an entire line in a text file by line number
body: <p>I have a situation where I want a bash script to replace an entire line in a file.
  The line number is always the same, so that can be a hard-coded variable.</p>
  
  <p>I'm not trying to replace some sub-string in that line, I just want to replace that line entirely with a new line.</p>
  
  <p>Are there any bash methods for doing this (or something simple that can be thrown into a .sh script).</p>