title: Running an IPython/Jupyter notebook non-interactively
body: <p>Does anyone know if it is possible to run an IPython/Jupyter notebook non-interactively from the command line and have the resulting <code>.ipynb</code> file saved with the results of the run.  If it isn't already possible, how hard would it be to implement with phantomJS, something to turn the kernel on and off, and something to turn the web server on and off?</p>
  
  <p>To be more specific, let's assume I already have a notebook <code>original.ipynb</code> and I want to rerun all cells in that notebook and save the results in a new notebook <code>new.ipynb</code>, but do this with one single command on the command line without requiring interaction either in the browser or to close the kernel or web server, and assuming no kernel or web server is already running.</p>
  
  <p>example command:</p>
  
  <p><code>$ ipython notebook run original.ipynb --output=new.ipynb</code></p>