Expand description
Bash history (.bash_history).
Plain one-command-per-line by default. With HISTTIMEFORMAT set, each entry
is preceded by a #<unix_epoch> line (Bash manual, Bash History Builtins).
Multi-line commands are stored with literal embedded newlines (cmdhist on,
default), so a #<digits> line is the only reliable entry boundary — the
lines that follow it accumulate into one command until the next boundary.
Functions§
- parse
- Parse bash history bytes into entries.
- parse_
timestamp_ line - If
lineis a bash timestamp line (#immediately followed by ≥1 digits and nothing else), return the epoch. Bash writes only the raw integer.