Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!umd5!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.wizards Subject: Re: sh(1) command substitution and here documents Message-ID: <12168@mimsy.UUCP> Date: 27 Jun 88 17:22:11 GMT References: <1254@cadre.dsl.PITTSBURGH.EDU> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 26 In article <1254@cadre.dsl.PITTSBURGH.EDU> jack@cadre.dsl.PITTSBURGH.EDU (Jack Nelson) writes: >... using [a] here document: > #!/bin/sh > var=`bc <scale=2 > 3 / 4 > End > ` >But this doesn't work; an error message "cannot open /tmp/sh01383" >always is produced, both on 4.3 and 2.10 systems. Is there a way >to do this? Can one deduce this behavior from the manual? It is almost noted in the BUGS section: If << is used to provide standard input to an asynchronous process invoked by &, the shell gets mixed up about naming the input document. A garbage file /tmp/sh* is created, and the shell complains about not being able to find the file by another name. Given this, the error message above, and the fact that a garbage file is created, you can guess what is happening. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris