How can I pipe the stdout of multiple commands to a single command?
Example 1: combine and sort the output of all three echo commands:
echo zzz; echo aaa; echo kkk
setopt > /tmp/foo; unsetopt >> /tmp/foo; set >> /tmp/foo; sort /tmp/foo
Use parentheses ()'s to combine the commands into a single process, which will concatenate the stdout of each of them.
$ (echo zzz; echo aaa; echo kkk) | sort aaa kkk zzz
(setopt; unsetopt; set) | sort