Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!udel!princeton!jonlab!jon From: jon@jonlab.UUCP (Jon H. LaBadie) Newsgroups: comp.unix.shell Subject: Re: How do you pipe after a here document Summary: put the pipe on the command line Message-ID: <873@jonlab.UUCP> Date: 10 Nov 90 23:39:18 GMT References: <1990Nov8.201508.13222@cid.aes.doe.CA> Distribution: na Organization: 4455 Province Line Rd., Princeton, NJ 08540 Lines: 41 In article <1990Nov8.201508.13222@cid.aes.doe.CA>, afsipmh@cidsv01.cid.aes.doe.CA writes: > > I want to do something like the following: > > #! /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? The pipe symbol (not necessarily the command, but the symbol) must be on the current command line. The current command line is "cat ...". Either of the following will work: cat <