From Bash Reference Manual
A pipeline is a sequence of simple commands separated by one of the control operators
|or|&.
From POSIX 2013
A pipeline is a sequence of one or more commands separated by the control operator
|.
I know that Bash has many extensions to POSIX shells, e.g. |&.
But are the component commands of a pipeline
- simple commands or
- just any commands (simple, pipeline again, list, compound, and function)?
In Bash, the following works
$ for f in $(ls *); do echo $f; done | cat
but the first component command of the pipeline isn't simple but compound.
echois a built-in command of bash, but there is also/bin/echothat does almost exactly the same thingls *, I tried to edit, but it wouldn't let me make such a minor edit. Needed more characters. Put 5 spaces in front of that line, which marks up as 'code', then you can add the backticks