Member-only story

Dev 101: Shell in a nutshell

Tom Deneire
4 min readFeb 17, 2022

In the Dev 101 series I cover some basic concepts of computer programming for a broad audience. I guess it’s the explanation I was looking for myself, when I first started out as a programmer…

Photo by Jonas Dücker on Unsplash

In a previous installment of the Dev 101 series, I explained the concept of the shell a command language interpreter that executes commands read from standard input, a command line string, or a specified file.

This means that shell can be used either interactively via the terminal:

tdeneire@XPS-13-9370:~$ sh
$ echo "hello"
hello
$ exit
tdeneire@XPS-13-9370:~$

or as a CLI:

sh -c "echo $(date)"

or to execute Shell scripts, saved as .shfiles like this:

#!/bin/shecho "Hello world"

You can then execute them with sh myfile.sh

Especially the last option is a fantastic tool for writing scripts for automation, installation, configuration, and so on.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Tom Deneire
Tom Deneire

Written by Tom Deneire

Software engineer, technical writer, IT burnout coach @ https://tomdeneire.be/confident_coding

No responses yet

Write a response