Article View: comp.unix.shell
Article #1751Re: How do you pipe after a here document
From: D'Arcy J.M. Cain
Date: Sat, 10 Nov 1990 12:46
Date: Sat, 10 Nov 1990 12:46
24 lines
1096 bytes
1096 bytes
In article <1990Nov8.201508.13222@cid.aes.doe.CA> afsipmh@cidsv01.cid.aes.doe.CA () writes: > >#! /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? Well the last line has no connection to the rest of the script so I am not suprised. I assume you tried putting it on the same line as "END" and saw that there was no effect either. The answer is to put it on the "cat" line like this: cat | grep coconuts << END -- D'Arcy J.M. Cain (darcy@druid) | D'Arcy Cain Consulting | I support gun control. West Hill, Ontario, Canada | Let's start with the government! + 416 281 6094 |
Technical Details
Message-ID:
<1990Nov10.124624.9134@druid.uucp>Path:
arc1-ca.pugleaf.net!utzoo!telly!druid!darcyReferences:
<1990Nov8.201508.13222@cid.aes.doe.CA>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell Path: arc1-ca.pugleaf.net!utzoo!telly!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Re: How do you pipe after a here document Organization: D'Arcy Cain Consulting, West Hill, Ontario Distribution: na Date: Sat, 10 Nov 90 12:46:24 GMT Message-ID: <1990Nov10.124624.9134@druid.uucp> References: <1990Nov8.201508.13222@cid.aes.doe.CA>