Post AzwpNnbcAuPeH6KjsO by vnikolov@ieji.de
(DIR) More posts by vnikolov@ieji.de
(DIR) Post #AzwpNnbcAuPeH6KjsO by vnikolov@ieji.de
2025-11-05T20:21:25Z
1 likes, 0 repeats
Live a whole century, keep learning for a whole century, the Russians say.Today I Learnedâ„¢ how the Bourne-again shell catches bullets carefullyaimed at my foot.I have a `bash' script, call it `baz', that post-processes textproduced by `foo-bar' (rest assured, though, that it remains withinall recognition).Doing due diligence documentation-wise, I wanted to collect an exampleof the end result into a comment in the same script.So naive, I took myself for a ride:$ foo-bar | baz | sed 's/^/### /' >> bazbash: 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 leftas 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