I just ran across the following bash construct, I understand this is called compound-list and that those three cat commands are executed in a subshell environment, what I do not get is how the pipes fit in there and more generally, how it works. I would really appreciate a step by step explanation.
It is part of a binary image generation script so I kindof know alreayd what it does, what I do not get is how it gets there:
export DD="dd status=noxfer bs=1k iflag=fullblock" ( cat $DIR/file1 /dev/zero | $DD count=128 cat $DIR/file2 /dev/zero | $DD count=128 cat $DIR/file3 /dev/zero ) | $DD of=$OUT_FILE count=$SIZE
Some bash guru out there can help me?