Two independent shell lists connect through HISTFILE: session A appends with -a, and session B imports with -n.

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 · 5 min · XB Field Notes
Unquoted report final.md splits into two arguments; quoted expansion preserves one.

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
A separate $0 identity stays fixed while shift removes the empty first positional argument and moves two words from $2 to $1.

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
Unset and empty states both flow to a colon default; omitting the colon preserves an empty value.

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 requested mode branches to ordinary umask filtering or default ACL inheritance; existing inodes follow a separate path.

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
At Bash input-read time, the command word ll expands into ls -l while the quoted two words argument stays alongside it.

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 · 5 min · XB Field Notes
For >log 2>&1, the first snapshot sends descriptor 1 to log and leaves 2 at its old destination; the second sends both to log. For 2>&1 >log, both first refer to the old stdout destination, then only 1 moves to log. Copying does not create a live alias.

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
A producer sends stdout through a finite byte pipe to a concurrent consumer’s stdin. Its stderr branches separately to a terminal. Program buffering may still delay when bytes enter the pipe.

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 · 5 min · XB Field Notes