I want to run a bash script in my ipython Notebook and save the output as a string in a python variable for further manipulation. Basically I want to pipe the output of the
Notice the difference in the variable type between @MattDMo (SList) and @oLas (str) answers:
SList
str
In [1]: output = !whoami In [2]: type(output) Out[2]: IPython.utils.text.SList In [3]: %%bash --out output ...: whoami In [4]: type(output) Out[4]: str