You know, I wondered where this question went. My apologies for
misposting...
"Bill Caroselli" <qtps@earthlink.net> wrote in message
news:cg5o7r$8i4$1@inn.qnx.com...
Quote:
Kevin Miller <kevin.miller@transcore.com> wrote:
KM > If I try to do a "here document" in a shell subroutine, like this:
KM > routine ()
KM > {
KM > cat <<-DONE
KM > this is a test
KM > of a here document
KM > DONE
KM > }
KM > routine
KM > I get an error message like this:
KM > /tmp/sh1491500: cannot open (No such file or directory)
KM > If I do the same in the main body of the shell script, for instance,
by just
KM > removing the "routine ()" from the above, it works just fine. Can
anyone
KM > shed some light on this?
KM > Thanks,
KM > Kevin
I believe that the DONE must be on a line by itself with no white space
before or after it.
When this does work for you, was it still indented?
Try not indenting it.
|