kent@happym (12/27/87)
In article <3103@ihlpf.ATT.COM>, lukas@ihlpf.ATT.COM (Lukas) writes: > I have a shell script like: > > sacego -q line_obj <<-eof | > opr ... > ans1 > ans2 > ans3 > eof > > (ans? are answers to prompts from sacego) which does not work, and > generates obscure messages, e.g.: > > /tmp/sh63112: cannot open > > When I put the pipeline all on one line, vis: > > sacego -q line_obj <<-eof | opr ... > > all works fine. > /bin/sh, in all of the implementations that I have used, has trouble with here files ( <<EOF et al ) in pipelines and in the background. In scripts, when I want: foo (<-END-OF-LIST & list of data ... END-OF-LIST I use the following instead, because sh gets confused about the name of the temp file: ( foo (<-END-OF-LIST list of data ... END-OF-LIST ) & In a pipeline, similar treatment works: ( foo <<-EOF ... EOF ) | etc Sometimes the bug is noted on the sh(1) man page, other times it is not. -- -- Kent Forschmiedt -- uucp: tikal!camco!happym!kent
kent@happym (12/27/87)
In my previous posting, I meant "foo <<-END-OF-LIST", not "foo (<-END-OF-LIST" -- -- Kent Forschmiedt -- uucp: tikal!camco!happym!kent