In what ways are pipes different from variable assignments?I know you can't use null bytes.  What other examples are there?What about for piping in something like the following yes | cat?I notice it outputs the y while assigning test=`yes`doesn't output anything.  Is the entire command executed before it pipes the data while cat is being executed?
Pipes vs variable assignment
pipe;variable
test=`yes` will attempt to read the complete output of yes and assign that to the variable test.Since the output of yes is infinite, this assignment will invoke an infinite loop.Under the hood, it uses the pipe operating system mechanism, just like the | operation does.test=`yes`is kind of likeyes | thisShell.slurpInputAndSaveToVariable testcat doesn't try to slurp its whole input, which makes it possible for yes and cat to run concurrently as a streaming producer (and infinite one in this case) and consumer pair.