help with pipes
cbuxton at menandmice.com
Mon Feb 23 09:09:28 PST 2009
On Feb 21, 2009, at 6:13 PM, Robert Connolly wrote:
> For example:
> patch -p1 < ../loop-AES-v3.2e-20090112.diff
> works, but
> patch -p1 < $(bzcat ../loop-AES-v3.2e-20090112.diff.bz2)
> does not (ambiguous redirect).
The '<' character tells bash to read stdin from the file given. Your
second example, $(bzcat ...), yields a text stream, not a filename, so
you must use '<<<' to turn that into stdin for the patch command
(unless you pipe the output using '|').
Men & Mice
More information about the hlfs-dev