Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!joyce!csl!porthos!aida
From: aida@porthos.csl.sri.com (Hitoshi Aida)
Newsgroups: comp.unix.wizards
Subject: Re: sh(1) command substitution and here documents
Message-ID: <5632@csl.CSL.SRI.COM>
Date: 22 Jun 88 18:18:58 GMT
References: <1254@cadre.dsl.PITTSBURGH.EDU> <6774@sigi.Colorado.EDU>
Sender: usenet@csl.CSL.SRI.COM
Reply-To: aida@porthos.UUCP (Hitoshi Aida)
Organization: Computer Science Lab, SRI International
Lines: 21

In article <6774@sigi.Colorado.EDU> wu@spot.Colorado.EDU (WU SHI-KUEI) writes:
>The following will do just fine:
>
>	#!/bin/sh		# not needed with REAL UNIX
>	var=`bc '
>	scale = 2
>	3 / 4
>	quit'`

Not quite correct.  The following will do just fine:

	#!/bin/sh		# not needed with REAL UNIX
	var=`echo '
	scale = 2
	3 / 4
	quit' | bc`

"quit" can be omitted.

Hitoshi AIDA	(aida@csl.sri.com)
Computer Science Lab, SRI International