[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crazy make rules with here documents, example.

From: Mike Mestnik
Subject: Re: Crazy make rules with here documents, example.
Date: Tue, 06 Apr 2010 12:44:18 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100317 Thunderbird/3.0.4

On 4/6/2010 12:37 PM, Stephan Beal wrote:
On Tue, Apr 6, 2010 at 7:25 PM, Mike Mestnik <address@hidden
<mailto:address@hidden>> wrote:

    { printf "line1\n"; printf "line2\n"; } | cat > blah.tmp

    { printf "line1\n"; printf "line2\n"; } | gcc...

If you're using bash (and possibly some other shells), it's easier to:

{ print "..."; printf "..."; } > blah.tmp
{ print "..."; printf "..."; } | gcc ...

i don't know if that syntax works in Bourne-compatibility mode.

Yes, I see the advantage here. However this is almost exactly what I have... Except doing it with variables make it more transparent...

PFOPEN:={ print "
PFBR:="; printf "
PFCLOSE:="; } |


----- stephan beal

Mike Mestnik
Technical Team
Nagios Enterprises, LLC
Email:  address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]