Unquoted expansion that silently splits a string into several arguments.

Shell word splitting turns unquoted variables into several arguments

A shell variable holds a string, but an unquoted expansion can turn that string into several command arguments. In Bash, word splitting examines expansion results using IFS as the delimiter set. This is why a pathname that works when typed with quotes can fail after being stored in a variable. Debug the arguments the receiving command actually gets, including empty ones, before blaming the filesystem. ...

December 31, 2027 · 4 min · XB Field Notes
The numbered arguments a script receives from a command line.

Shell positional arguments are a numbered list

A shell script receives an ordered argument list, not a single command-line string that it must split again. Positional parameters expose that list as $1, $2, and subsequent entries; $# reports its size. A small fixed interface can use these positions directly. Optional settings and flags benefit from explicit parsing, but either design still needs to define the permitted count, empty values, and failure behavior. ...

November 29, 2027 · 5 min · XB Field Notes
The operators that rewrite a variable into a new value before the shell runs a command.

Shell parameter expansion rewrites values

Parameter expansion derives a value from a shell parameter before a command receives its arguments. It can provide a default, reject missing configuration, or remove part of a string without launching another process. This is expansion during execution, not an instruction to evaluate every variable when the script is first parsed: a function reads the current value when it runs. ...

November 16, 2027 · 4 min · XB Field Notes
A shell mutating a filename pattern before the target program runs.

Bash globbing expands before the command runs

A wildcard in a Bash command usually becomes a list of pathnames before the target program starts. That makes *.txt convenient, but it also makes the command depend on the current directory and shell options. The program receives arguments, without information saying which ones came from a wildcard. Decide whether you intend to pass matching files or a pattern for the program to interpret. ...

September 8, 2027 · 4 min · XB Field Notes
Built-in variables that expose the full positional list to a script.

$@ and friends give a function its whole argument list

A wrapper should pass the arguments it received without changing their boundaries. In Bash, "$@" does that when used as command arguments: each positional parameter becomes a separate quoted word. This matters for empty values, spaces, newlines, and literal wildcard characters. A command that happens to work with two simple filenames can still be broken if its wrapper reconstructs the list as a single string. ...

April 16, 2027 · 4 min · XB Field Notes
A small integer every process leaves behind to say how it ended.

Exit status is a compact report of what went wrong

An exit status is a small value that a shell uses to decide what runs next. Zero means success for shell control flow; a nonzero status takes the failure branch. That does not give every number a universal application meaning. A search with no matches, invalid input, and an unavailable server may deserve different handling even though all can produce nonzero results. Read the command’s contract before deciding what to retry or ignore. ...

March 27, 2027 · 4 min · XB Field Notes
A reusable block that reads parameters positionally and scopes its variables.

A shell function reads its arguments like a script

A shell function groups commands under a name and receives its own positional arguments. In an ordinary call, its body runs in the current shell rather than automatically starting a separate process. That makes functions useful for reusable operations, but it also means assignments, directory changes, and other shell state can affect the caller. A function needs an explicit contract for inputs, output, status, and any intentional side effects. ...

March 16, 2027 · 4 min · XB Field Notes
A runtime expansion where a subprocess runs inside a word and its stdout takes its place.

Command substitution puts one command's output into another line

Command substitution captures a command’s standard output and inserts the resulting text into a surrounding expression. The familiar $(command) form is useful for a timestamp, a computed label, or another small textual value. It is not a transparent channel for arbitrary bytes or a reliable way to transport a list of filenames. Its newline handling, execution environment, and exit status are part of the interface you need to understand. ...

March 3, 2027 · 4 min · XB Field Notes