A searchable list of commands retained by Bash history

Bash history is your searchable command log

A useful command history saves retyping, but it is not a complete record of everything executed. Bash normally enables history in interactive shells, and settings can exclude entries or limit retention. The searchable list in a running shell and the history file on disk are separate states. That distinction explains why a command may be visible in one terminal, absent in another, and lost when an unwritten session ends unexpectedly. ...

February 28, 2028 · 4 min · XB Field Notes
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
Creation combines a requested mode with either the process mask or inherited default ACL rules.

Umask filters new permissions, with a default ACL exception

A process’s umask removes permission bits when creating files and directories under the ordinary mode-based creation rule. The application first supplies a requested mode; the mask restricts that request. It is neither a complete access policy nor an instruction to rewrite existing files. A directory’s default access control list changes the creation calculation, so inspecting only the process mask can give an incomplete prediction. ...

October 9, 2027 · 5 min · XB Field Notes
A short word that expands to a longer command in an interactive shell.

Shell aliases shrink repeated typing

An alias replaces a command word with shell text while Bash reads a command. It is useful for personal shortcuts such as alias ll='ls -l', but it is not an executable and has no independent argument scope. Noninteractive Bash disables alias expansion by default; a script can explicitly enable it. Understanding that distinction explains why a shortcut works at a prompt but disappears in automation. ...

October 4, 2027 · 4 min · XB Field Notes
A command pointing output and error to files before it starts.

Redirection reorders the streams

Redirection changes a command’s file descriptors before the command executes. The shell processes redirections from left to right, opening or duplicating a descriptor as it reaches each operation. Descriptors 0, 1, and 2 conventionally represent standard input, standard output, and standard error. Reading this sequence as concrete changes to those handles explains both misplaced diagnostics and files that become empty before their contents can be read. ...

September 29, 2027 · 4 min · XB Field Notes
Two commands passing data continuously from a producer to a consumer.

Shell pipes stream between processes

A shell pipeline connects one command’s standard output to the next command’s standard input. The commands can run concurrently, so the producer need not finish before the consumer starts. This supports incremental processing, but the pipe itself does not guarantee that either program processes data incrementally. Buffering, early termination, and the status of each stage determine whether the complete operation does what you intended. ...

September 28, 2027 · 4 min · XB Field Notes