🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #1748

Re: How do you pipe after a here document

#1748
From: Di Zhang
Date: Fri, 09 Nov 1990 07:31
28 lines
1015 bytes
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 <<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.
Technical Details
Message-ID: <10234@uhccux.uhcc.Hawaii.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!bu.edu!att!pacbell.com!ames!uhccux!wiliki!dzhang
References: <1990Nov8.201508.13222@cid.aes.doe.CA>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!bu.edu!att!pacbell.com!ames!uhccux!wiliki!dzhang
From: dzhang@wiliki.eng.hawaii.edu (Di Zhang)
Newsgroups: comp.unix.shell
Subject: Re: How do you pipe after a here document
Message-ID: <10234@uhccux.uhcc.Hawaii.Edu>
Date: 9 Nov 90 07:31:12 GMT
References: <1990Nov8.201508.13222@cid.aes.doe.CA>
Sender: news@uhccux.uhcc.Hawaii.Edu
Reply-To: dzhang@wiliki.UUCP (Di Zhang)
Distribution: na
Organization: University of Hawaii, College of Engineering
Lines: 28