Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 May 2002 12:05:22 -0700 (PDT)
From:      Archie Cobbs <archie@dellroad.org>
To:        freebsd-questions@freebsd.org
Subject:   sh 'here document' question
Message-ID:  <200205201905.g4KJ5MM53848@arch20m.dellroad.org>

next in thread | raw e-mail | index | archive | help
Is this supposed to work? It doesn't.

    $ cat foo.sh 
    PREFIX=foo
    SUFFIX=bar
    . << xxxEOFxxx
    ${PREFIX}${SUFFIX}=abc
    xxxEOFxxx
    echo foobar=${foobar}
    $ sh foo.sh 
    foobar=
    $

This is FreeBSD 4.5-REL. If you write the '${PREFIX}${SUFFIX}=abc'
to a file and then input that file using '.' then it does work.
So why the difference?

Thanks,
-Archie

__________________________________________________________________________
Archie Cobbs     *     Packet Design     *     http://www.packetdesign.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205201905.g4KJ5MM53848>