Jupyter notebook is a handy little system for running and documenting your code. I use it frequently for my python 2.7 code, but I also write a lot of code in bash. I was using emacs org-mode to write and document my bash scripts, but I recently decided to port them to jupyter notebook. Here’s how to do it!
Setting up python environment
If you haven’t already used it, Anaconda is a pretty useful system for managing different python installations and environments. Here’s how you install it (python 2.7 version) for OSX:
The bash kernel for Jupyter notebook requires python 3. Because I do a lot of bioinformatics stuff that relies on python 2.7 I installed that Anaconda version. However, we can easily get python 3.X. Here’s how:
Installing the bash kernel
The new bash kernel can be installed using pip (already installed with anaconda)
Running the notebook
Now bash should be an available kernel for working in your notebooks. Good to go!