Newsgroups: comp.unix.shell Path: 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> In article <1990Nov8.201508.13222@cid.aes.doe.CA> afsipmh@cidsv01.cid.aes.doe.CA () writes: > >#! /bin/sh >cat <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 |