Einleitung in die Linux Shell

Warum du die Shell kennen solltest Bevor Icons und Fenster die Bildschirme der Computer erobert haben, hast du Befehle eingegeben, um mit den meisten Computern zu interagieren. Auf UNIX-Systemen, von denen Linux abstammt, war das Programm, das diese Befehle interpretiert und verwaltet hat, die Shell. Du kannst dich darauf verlassen, dass die Shell unabhängig von deiner Linux-Distribution immer verfügbar ist. Sie ermöglicht dir, ausführbare Skriptdateien zu erstellen, Programme […]

https://andreas-moor.de/einleitung-in-die-linux-shell/

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

Bash - GNU Project - Free Software Foundation