Shell Languages and the Linearization of Syntax

By Xah Lee. Date: .

Shell Languages and the Linearization of Syntax

Now let me explain, xah monolog, on what is shell, its design elements.

First of all, what is a shell. Typically, it refers to the command line shell. e.g. unix bash. Most well known. Sometimes, it also refers to a “graphical shell”. Typically, a windowing system, or desktop aka gnome, are graphical shells.

In general, a shell is defined to be something that lets one interface with the os. That sense, is kind lose and old. Shell, originally, is just a command line to os. And 40 years ago, unix shell, are exactly, an interface to the os. Anything u do with os, is done by command. Not so today. Lots things u do with os today, u cannot do with command line. And the concept of graphical shell, doesn't mean much of anything, because it just became synonymous to a gui. Mostly, the graphical shell meaning become more of a skin thing.

But, let's take the classic definition of shell. Namely, command line interface to os, and just the things that bash do, as today's bash and powershell.

Now, there r 2 elements to designing a shell.

semantic of shell

The basic operations with os, may be called the semantic part of the shell. In unix sh, we have things such as, ls, cat, grep, find, which, who, w, finger, cp, mv, touch, mkdir, rm, fsck, message, etc. And ps, kill, fg, type etc. These are the “semantic” part. Namely, they are the things you need a shell to do. So, in designing a shell lang, you need this. U need to figure out what command, or action, that a user need to do or be able to do with os, with your shell lang.

linearized syntax

Unix Shell