shBash

Bash glossary – key terms explained

Command substitution

$(command) is replaced by the output of the command.

cron

A service that runs commands on a schedule; configured via crontab.

Exit code

A number (0–255) a process returns when it ends. 0 = success; readable via $?.

Glob / wildcard

Patterns like * or ? that the shell expands to file names (not the same as regex).

Here-document

<<EOF passes multi-line text as stdin to a command.

Parameter expansion

${var...} syntax for default values, substrings, replacements and lengths.

Pipe

The character |: the output of one program becomes the input of the next directly.

POSIX shell

The standardized language core (sh); scripts with #!/bin/sh should not use Bash extensions.

Process substitution

<(command) provides the output of a command as a temporary file.

Quoting

Quotes control expansion: "..." allows variables, '...' is literal, a backslash escapes single characters.

Redirect

>, >>, <, 2>: direct input and output into/from files.

Shebang

The first script line #!/usr/bin/env bash, which determines the interpreter.

Shell

A program that reads and executes commands (bash, zsh, sh, fish). Bash is the "Bourne Again Shell".

ShellCheck

A static analyzer for shell scripts that finds quoting and logic errors.

Signal

A message to a process, e.g. SIGINT (Ctrl+C), SIGTERM, SIGKILL.

stdin / stdout / stderr

Standard data channels (0, 1, 2): input, normal output, error output.

Strict mode

set -euo pipefail: abort on errors, undefined variables and failures in pipelines.

Subshell

A child process of the shell (e.g. with ( ... ), $(...) or pipes) with its own copy of the variables.

Terminal

A window program in which a shell runs; not the same as the shell itself.

trap

A Bash command that runs a handler on signals or on exit (EXIT), e.g. for cleanup.