How do you pipe after a here document
Di Zhang
dzhang at wiliki.eng.hawaii.edu
Fri Nov 9 18:31:12 AEST 1990
In article <1990Nov8.201508.13222 at cid.aes.doe.CA> afsipmh at cidsv01.cid.aes.doe.CA () writes:
>
> I want to do something like the following:
>
>#! /bin/sh
>cat <<END
>I,ve got
>a lovely
>bunch of coconuts
>END
>| grep coconuts
>
>The above doesn't work so how can I do it?
The above form has seperated the two commands. The following form
will work:
#! /bin/sh
cat <<END | grep accounts
I,ve got
a lovely
bunch of accounts
END
Di.
More information about the Comp.unix.shell
mailing list