Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!princeton!dae.Princeton.EDU!pfalstad From: pfalstad@dae.Princeton.EDU (Paul Falstad) Newsgroups: comp.unix.shell Subject: Re: Piping here documents Message-ID: <6070@idunno.Princeton.EDU> Date: 8 Feb 91 05:11:14 GMT References: <6061@idunno.Princeton.EDU> Sender: news@idunno.Princeton.EDU Organization: The Royal Society For Putting Things On Top Of Other Things Lines: 35 rhl@grendel.Princeton.EDU (Robert Lupton (the Good)) wrote: >What's the best way of piping a here document into a long shell script? >For a one liner >#!/bin/sh >cat <<-EOF | sed -e s/Hello/Goodbye/ > Hello world >EOF These should give you some ideas: #!/bin/sh cat < 20 GOTO 10 | [Your blood pressure just went up.] Princeton University would like to apologize to everyone for this article.