Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

To run a bash example by yourself, open a bash session using your favourite terminal emulator (macOS Terminal, iTerm, Kitty, Git Bash, MobaXterm, ...), and just copy & paste the commands.

The bash version used to run the examples for this book was:

5.3.9(1)-release

2.4.1Multi-cells example

Most bash examples run on multiple snippets (a.k.a.: multi-cells). In such an example, one single session must be opened, and all the commands must be run in the this session, without quitting it. In the book, multi-cells examples are tagged on their right with start for the first cell, stop for the last cell, and cont for the cells in between.

Example:

/__w/rust/rust/notebooks/foo /__w/rust/rust/notebooks
a.txt
/__w/rust/rust/notebooks

2.4.2Availability of commands

Some commands are native bash commands (e.g.: pushd, popd, cd, echo, ...), others must be installed on your system to run them.

Standard Unix commands, like mkdir, ls, find, cat, etc, should already be available on your system. Some others (e.g.: which, tree) are not always installed by default, see Missing tools.

Sometimes, you will find some more modern version of the Unix commands (e.g.: bat, eza) that we use in the course for their better looking and clearer outputs. See also Missing tools to know how to install them.

2.4.3Running in another shell

All the examples have been tested with bash, not other shells.

However most of commands should work with other shells. So, for instance, for macOS users, there is no need to run bash, they may stay with zsh. Unless it is explicitly stated in the course that you must use bash.