SWC has a single, global glossary [1], not per-subject glossaries.
Because this per-subject branch no longer contains the global
glossary, we need to adjust the links to point at an external
glossary. Done automatically with:
$ sed -i 's|\.\./\.\./gloss.html|https://github.com/swcarpentry/bc/blob/ma
ster/gloss.md|g' *.md
[1]: https://github.com/swcarpentry/bc/blob/master/gloss.md
so programming languages and interfaces had to be designed around that constraint.
This kind of interface is called a
-[command-line interface](../../gloss.html#cli), or CLI,
+[command-line interface](https://github.com/swcarpentry/bc/blob/master/gloss.md#cli), or CLI,
to distinguish it from the
-[graphical user interface](../../gloss.html#gui), or GUI,
+[graphical user interface](https://github.com/swcarpentry/bc/blob/master/gloss.md#gui), or GUI,
that most people now use.
-The heart of a CLI is a [read-evaluate-print loop](../../gloss.html#repl), or REPL:
+The heart of a CLI is a [read-evaluate-print loop](https://github.com/swcarpentry/bc/blob/master/gloss.md#repl), or REPL:
when the user types a command and then presses the enter (or return) key,
the computer reads it,
executes it,
and the computer sends output directly to the user.
In fact,
there is usually a program in between called a
-[command shell](../../gloss.html#shell).
+[command shell](https://github.com/swcarpentry/bc/blob/master/gloss.md#shell).
What the user types goes into the shell;
it figures out what commands to run and orders the computer to execute them.
</div>
The part of the operating system responsible for managing files and directories
-is called the [file system](../../gloss.html#filesystem).
+is called the [file system](https://github.com/swcarpentry/bc/blob/master/gloss.md#filesystem).
It organizes our data into files,
which hold information,
and directories (also called "folders"),
~~~
</div>
-The dollar sign is a [prompt](../../gloss.html#prompt),
+The dollar sign is a [prompt](https://github.com/swcarpentry/bc/blob/master/gloss.md#prompt),
which shows us that the shell is waiting for input;
your shell may show something more elaborate.
let's find out where we are by running a command called `pwd`
(which stands for "print working directory").
At any moment,
-our [current working directory](../../gloss.html#current-working-directory)
+our [current working directory](https://github.com/swcarpentry/bc/blob/master/gloss.md#current-working-directory)
is our current default directory,
i.e.,
the directory that the computer assumes we want to run commands in
unless we explicitly specify something else.
Here,
the computer's response is `/users/vlad`,
-which is Vlad's [home directory](../../gloss.html#home-directory):
+which is Vlad's [home directory](https://github.com/swcarpentry/bc/blob/master/gloss.md#home-directory):
<div class="in" markdown="1">
~~~
To understand what a "home directory" is,
let's have a look at how the file system as a whole is organized.
-At the top is the [root directory](../../gloss.html#root-directory)
+At the top is the [root directory](https://github.com/swcarpentry/bc/blob/master/gloss.md#root-directory)
that holds everything else.
We refer to it using a slash character `/` on its own;
this is the leading slash in `/users/vlad`.
`ls` prints the names of the files and directories in the current directory in alphabetical order,
arranged neatly into columns.
-We can make its output more comprehensible by using the [flag](../../gloss.html#command-line-flag) `-F`,
+We can make its output more comprehensible by using the [flag](https://github.com/swcarpentry/bc/blob/master/gloss.md#command-line-flag) `-F`,
which tells `ls` to add a trailing `/` to the names of directories:
<div class="in" markdown="1">
</div>
Here,
-we can see that `/users/vlad` contains seven [sub-directories](../../gloss.html#sub-directory).
+we can see that `/users/vlad` contains seven [sub-directories](https://github.com/swcarpentry/bc/blob/master/gloss.md#sub-directory).
The names that don't have trailing slashes,
like `notes.txt`, `pizza.cfg`, and `solar.pdf`,
are plain old files.
> almost anything else we want. However, most people use two-part names
> most of the time to help them (and their programs) tell different kinds
> of files apart. The second part of such a name is called the
-> [filename extension](../../gloss.html#filename-extension), and indicates
+> [filename extension](https://github.com/swcarpentry/bc/blob/master/gloss.md#filename-extension), and indicates
> what type of data the file holds: `.txt` signals a plain text file, `.pdf`
> indicates a PDF document, `.cfg` is a configuration file full of parameters
> for some program or other, and so on.
Notice, by the way that we spelled the directory name `data`.
It doesn't have a trailing slash:
that's added to directory names by `ls` when we use the `-F` flag to help us tell things apart.
-And it doesn't begin with a slash because it's a [relative path](../../gloss.html#relative-path),
+And it doesn't begin with a slash because it's a [relative path](https://github.com/swcarpentry/bc/blob/master/gloss.md#relative-path),
i.e., it tells `ls` how to find something from where we are,
rather than from the root of the file system.
If we run `ls -F /data` (*with* a leading slash) we get a different answer,
-because `/data` is an [absolute path](../../gloss.html#absolute-path):
+because `/data` is an [absolute path](https://github.com/swcarpentry/bc/blob/master/gloss.md#absolute-path):
<div class="in" markdown="1">
~~~
`..` is a special directory name meaning
"the directory containing this one",
or more succinctly,
-the [parent](../../gloss.html#parent-directory) of the current directory.
+the [parent](https://github.com/swcarpentry/bc/blob/master/gloss.md#parent-directory) of the current directory.
Sure enough,
if we run `pwd` after running `cd ..`, we're back in `/users/vlad`:
> if we are in `/users/vlad/data`,
> the command `ls ..` will give us a listing of `/users/vlad`.
> When the meanings of the parts are the same no matter how they're combined,
-> programmers say they are [orthogonal](../../gloss.html#orthogonal):
+> programmers say they are [orthogonal](https://github.com/swcarpentry/bc/blob/master/gloss.md#orthogonal):
> Orthogonal systems tend to be easier for people to learn
> because there are fewer special cases and exceptions to keep track of.
since there are 1520 possibilities;
pressing tab twice brings up a list of all the files,
and so on.
-This is called [tab completion](../../gloss.html#tab-completion),
+This is called [tab completion](https://github.com/swcarpentry/bc/blob/master/gloss.md#tab-completion),
and we will see it in many other tools as we go on.
<div class="keypoints" markdown="1">
</div>
Unfortunately,
-Unix reports sizes in [disk blocks](../../gloss.html#disk-block) by default,
+Unix reports sizes in [disk blocks](https://github.com/swcarpentry/bc/blob/master/gloss.md#disk-block) by default,
which might be the least helpful default possible.
If we add the `-h` flag,
`ls` switches to more human-friendly units:
> #### Wildcards
>
-> `*` is a [wildcard](../../gloss.html#wildcard). It matches zero or more
+> `*` is a [wildcard](https://github.com/swcarpentry/bc/blob/master/gloss.md#wildcard). It matches zero or more
> characters, so `*.pdb` matches `ethane.pdb`, `propane.pdb`, and so on.
> On the other hand, `p*.pdb` only matches `pentane.pdb` and
> `propane.pdb`, because the 'p' at the front only matches itself.
~~~
</div>
-The `>` tells the shell to [redirect](../../gloss.html#redirect) the command's output
+The `>` tells the shell to [redirect](https://github.com/swcarpentry/bc/blob/master/gloss.md#redirect) the command's output
to a file instead of printing it to the screen.
The shell will create the file if it doesn't exist,
or overwrite the contents of that file if it does.
~~~
</div>
-The vertical bar between the two commands is called a [pipe](../../gloss.html#pipe).
+The vertical bar between the two commands is called a [pipe](https://github.com/swcarpentry/bc/blob/master/gloss.md#pipe).
It tells the shell that we want to use
the output of the command on the left
as the input to the command on the right.
the calculation is "head of sort of word count of `*.pdb`".
Here's what actually happens behind the scenes when we create a pipe.
-When a computer runs a program—any program—it creates a [process](../../gloss.html#process)
+When a computer runs a program—any program—it creates a [process](https://github.com/swcarpentry/bc/blob/master/gloss.md#process)
in memory to hold the program's software and its current state.
-Every process has an input channel called [standard input](../../gloss.html#standard-input).
+Every process has an input channel called [standard input](https://github.com/swcarpentry/bc/blob/master/gloss.md#standard-input).
(By this point, you may be surprised that the name is so memorable, but don't worry:
most Unix programmers call it "stdin".
-Every process also has a default output channel called [standard output](../../gloss.html#standard-output)
+Every process also has a default output channel called [standard output](https://github.com/swcarpentry/bc/blob/master/gloss.md#standard-output)
(or "stdout").
The shell is actually just another program.
Instead of creating enormous programs that try to do many different things,
Unix programmers focus on creating lots of simple tools that each do one job well,
and that work well with each other.
-This programming model is called [pipes and filters](../../gloss.html#pipe-and-filter).
+This programming model is called [pipes and filters](https://github.com/swcarpentry/bc/blob/master/gloss.md#pipe-and-filter).
We've already seen pipes;
-a [filter](../../gloss.html#filter) is a program like `wc` or `sort`
+a [filter](https://github.com/swcarpentry/bc/blob/master/gloss.md#filter) is a program like `wc` or `sort`
that transforms a stream of input into a stream of output.
Almost all of the standard Unix tools can work this way:
unless told to do otherwise,
This wouldn't back up our files:
it would replace the content of `unicorn.dat` with whatever's in `basilisk.dat`.
-Instead, we can use a [loop](../../gloss.html#for-loop)
+Instead, we can use a [loop](https://github.com/swcarpentry/bc/blob/master/gloss.md#for-loop)
to do some operation once for each thing in a list.
Here's a simple example that displays the first three lines of each file in turn:
In this case, the list is the two filenames.
Each time through the loop,
the name of the thing currently being operated on is assigned to
-the [variable](../../gloss.html#variable) called `filename`.
+the [variable](https://github.com/swcarpentry/bc/blob/master/gloss.md#variable) called `filename`.
Inside the loop,
we get the variable's value by putting `$` in front of it:
`$filename` is `basilisk.dat` the first time through the loop,
</div>
The shell starts by expanding `*.dat` to create the list of files it will process.
-The [loop body](../../gloss.html#loop-body)
+The [loop body](https://github.com/swcarpentry/bc/blob/master/gloss.md#loop-body)
then executes two commands for each of those files.
The first, `echo`, just prints its command-line parameters to standard output.
For example:
> and won't be asked to read the file `red dragon.dat`.
>
> We can make our script a little bit more robust
-> by [quoting](../../gloss.html#shell-quoting) our use of the variable:
+> by [quoting](https://github.com/swcarpentry/bc/blob/master/gloss.md#shell-quoting) our use of the variable:
>
> ~~~
> for filename in *.dat
We are going to take the commands we repeat frequently and save them in files
so that we can re-run all those operations again later by typing a single command.
For historical reasons,
-a bunch of commands saved in a file is usually called a [shell script](../../gloss.html#shell-script),
+a bunch of commands saved in a file is usually called a [shell script](https://github.com/swcarpentry/bc/blob/master/gloss.md#shell-script),
but make no mistake:
these are actually small programs.
This works,
but it may take the next person who reads `middle.sh` a moment to figure out what it does.
-We can improve our script by adding some [comments](../../gloss.html#comment) at the top:
+We can improve our script by adding some [comments](https://github.com/swcarpentry/bc/blob/master/gloss.md#comment) at the top:
<div class="in" markdown="1">
~~~
>
> `grep`'s real power doesn't come from its options, though; it comes from
> the fact that patterns can include wildcards. (The technical name for
-> these is [regular expressions](../../gloss.html#regular-expression), which
+> these is [regular expressions](https://github.com/swcarpentry/bc/blob/master/gloss.md#regular-expression), which
> is what the "re" in "grep" stands for.) Regular expressions are both complex
> and powerful; if you want to do complex searches, please look at the lesson
> on [our website](http://software-carpentry.org). As a taster, we can