Live a whole century, keep learning for a whole century, the Russians say.
Today I Learned™ how the Bourne-again shell catches bullets carefully
aimed at my foot.
I have a `bash' script, call it `baz', that post-processes text
produced by `foo-bar' (rest assured, though, that it remains within
all recognition).
Doing due diligence documentation-wise, I wanted to collect an example
of the end result into a comment in the same script.
So naive, I took myself for a ride:
$ foo-bar | baz | sed 's/^/### /' >> baz
bash: baz: Text file busy
(I expected that the shell would (try to) execute the appended lines,
so I commented them Just In Time. Running this with `strace' is left
as an exercise.)
PIPESTATUS was (0 141 1) and the output "softly and suddenly vanished away"...
--
"For the Snark was a Boojum, you see."
#BourneAgainShell
#BourneShell
#ComputerProgramming
#Hunting
#LewisCarrol
#Queen
#QuoteAbuse