- Difficulty level: easy
- Time need to lean: 10 minutes or less
- Key points
- SoS works with Bash through either the bash kernel or the Calysto_bash kernel.
- SoS works with Zsh through the zsh-jupyter-kernel.
- The kernel interprets content of the cell as bash or zsh scripts
- Limited data exchange is supported because bash or zsh does not have a rich type system as Python
The Bash kernel is not rich in data types and everything is essentially a string. You can pass primitive datatypes from SoS to Bash but expect to get string representation of variables out of it.
In [1]:
echo "Hello World"
In [2]:
a = 'Hello Bash'
In [3]:
a
echo $a
In [4]:
echo {a}
In [5]:
b='Hello from Bash'
echo $b
In [6]:
b --from Bash
b
Out[6]:
The usage of the zsh kernel is identical to bash.
In [7]:
echo "Hello World"
In [8]:
a = 'Hello Zsh'
In [9]:
a
echo $a
In [10]:
echo {a}
In [11]:
b='Hello from Zsh'
echo $b
In [12]:
b --from Zsh
b
Out[12]: