[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parameter expansion/assignment broken in cat

From: Todd A. Jacobs
Subject: Parameter expansion/assignment broken in cat
Date: Mon, 30 Oct 2000 13:42:55 -0800 (PST)

Consider the following script sourced under Red Hat 7.0 and bash

        unset foo
        cat <<-.
                value of foo: $foo"
        echo $foo

While it appears to behave normally, the assignment operator inside the
cat statement seems to be broken. $foo is never really assigned the value
"test," even though it displays it as such inside cat. The echo statement
shows that the value has never truly been assigned to foo.

What is causing this behavior?

Todd A. Jacobs
Senior Network Consultant

reply via email to

[Prev in Thread] Current Thread [Next in Thread]