Bash Scripting an Iterated Sequence of IPython Commands

27 Views Asked by At

I am planning to run a series of commands in IPython, and I plan to do this in multiple iterations. Is there a way for me to streamline the process by making a shell script that:

  1. Will activate the conda environment
  2. Will activate IPython and execute a series of commands
  3. Will exit IPython, move some files, etc.
  4. Will return to Step 2 with a parameter in the commands changing in each iteration

Thank you!

I tried the following:

#!/usr/bin/bash

source activate env name

for i in {0..1000}

do

ipython
import <package>
commands
commands
commands(arg, i)
commands
exit()

done
0

There are 0 best solutions below