TIL (Today I Learned)
Short notes about things I learn.
2026-01-12 Unix history
Pipes were invented to make small Unix programs work together
Early Unix programs were small, sharp, and stubbornly simple. The real problem wasn’t power, it was how to make them talk. At Bell Labs, Douglas McIlroy proposed a simple idea: let one program pour its output straight into another, like a garden hose. Ken Thompson wired this into the system in 1973.
The shell made it usable through the | operator. Behind the scenes, | just redirects stdout from one process into stdin of the next using file descriptors and fork(). To the programs, nothing special is happening. They just read and write streams.
That simplicity killed temp files, encouraged chaining tools, and locked in a core Unix truth: composition beats cleverness.
Sources:
https://en.wikipedia.org/wiki/Pipeline_(Unix)
https://wiki.tuhs.org/doku.php?id=features:pipes
Early Unix programs were small, sharp, and stubbornly simple. The real problem wasn’t power, it was how to make them talk. At Bell Labs, Douglas McIlroy proposed a simple idea: let one program pour its output straight into another, like a garden hose. Ken Thompson wired this into the system in 1973.
The shell made it usable through the | operator. Behind the scenes, | just redirects stdout from one process into stdin of the next using file descriptors and fork(). To the programs, nothing special is happening. They just read and write streams.
That simplicity killed temp files, encouraged chaining tools, and locked in a core Unix truth: composition beats cleverness.
Sources:
https://en.wikipedia.org/wiki/Pipeline_(Unix)
https://wiki.tuhs.org/doku.php?id=features:pipes
2026-01-08 Unix history Ken Thompson
grep exists because Ken Thompson liked regex
Right off, Bell Labs wasn’t pushing grep as its own thing. Ken Thompson cared more about changing the editor, called ed - that curiosity about regular patterns changed everything. While building a newer version, qed, ed grew into something tighter and sharper; soon, there was a way to scan lines using patterns without fuss. That’s when regular expressions quietly made their way into the editor. Then came grep, dressed like a tight jacket around the core framework. It just felt right to use grep - thanks to how much Thompson loved regex at its core, not limited to typing commands alone.
Right off, Bell Labs wasn’t pushing grep as its own thing. Ken Thompson cared more about changing the editor, called ed - that curiosity about regular patterns changed everything. While building a newer version, qed, ed grew into something tighter and sharper; soon, there was a way to scan lines using patterns without fuss. That’s when regular expressions quietly made their way into the editor. Then came grep, dressed like a tight jacket around the core framework. It just felt right to use grep - thanks to how much Thompson loved regex at its core, not limited to typing commands alone.
2026-01-07 kubernetes debugging
OOMKilled is a Linux decision
When a Pod exceeds its memory limit, the Linux kernel (cgroups) kills the process with SIGKILL.
Kubernetes only reports the event.
Exit code 137 = OOM kill.
When a Pod exceeds its memory limit, the Linux kernel (cgroups) kills the process with SIGKILL.
Kubernetes only reports the event.
Exit code 137 = OOM kill.
2025-12-30 Unix/Linux/Shell
Fix your typos like a pro with `fc`
The fc (fix command) command opens your last executed command in $EDITOR. Works in bash, zsh, ksh, and other POSIX-compliant shells. When you save and quit, the command runs automatically.
The fc (fix command) command opens your last executed command in $EDITOR. Works in bash, zsh, ksh, and other POSIX-compliant shells. When you save and quit, the command runs automatically.
2025-12-23 kubernetes
Test DNS resolution inside a Kubernetes pod
Creates a temporary pod to test internal DNS resolution. First step to debug "connection refused" between services.
bash
kubectl run -it --rm debug --image=busybox -- nslookup <service>.<namespace>.svc.cluster.localCreates a temporary pod to test internal DNS resolution. First step to debug "connection refused" between services.
2025-12-23 Kubernetes
Pod logs after crash
bash
kubectl logs <pod> --previous shows logs from the previous container instance. Essential for debugging crashloops.