[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
2.04.11(1)-release:
unset foo
try=test
cat <<-.
${foo:=$try}
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
- Parameter expansion/assignment broken in cat,
Todd A. Jacobs <=