title: Writing a Unix shell script which will edit a certain line of a .in file
body: <p>I'd like to run a program several times with slightly different inputs.  The input file is a long .in file, and I'd only want to edit a single number in a specific line of that file.  So ideally I'd like to write a Unix script that repeats this process several times:</p>
  
  <hr>
  
  <ol>
  <li>Edits a line in a .in file</li>
  <li>Runs a program which uses that file as input</li>
  <li>Renames the output .nc file from the program and saves it</li>
  </ol>
  
  <hr>
  
  <p>I'm completely new to this sort of scripting, and while I'm pretty sure I can figure out how to do steps 2 and 3 of this process, I'm not sure how to do the second step.  Is it possible to use a script to automate the editing of a .in file, and how would I do that?</p>