* BASH env. variable's
@ 1996-04-16 11:31 ron_barrett
0 siblings, 0 replies; only message in thread
From: ron_barrett @ 1996-04-16 11:31 UTC (permalink / raw)
To: tru64-unix-managers
Hello,
I'm having trouble de-referencing environment variables in bash
(v1.14.6(4)) running under DU v3.2c. If I use echo statements with hard
coded variables (ie echo "variable 1 is ${var1}."), this works as I would
expect with variable var1 being translated into it's contents. If I try to
deference that variable with one more degree of indirection, however, it
appears to fail to de-reference. Hence if I have file called prog.msg with
the 1 line of text which reads:
variable 1 is ${var1}.
and I use the command echo "$(cat prog.msg)", my expectation is that the
var1 reference in the prog.msg file would get de-referenced and that the
resulting output from my command would be "variable 1 is _var1_contents_.",
but instead I get the output "variable 1 is ${var1}." There's a nice
section in the man pages on using quoting to prevent variables from being
de-referenced, but nothing which I can see on forcing variables to be
recognized and de-referenced. Am I missing something obvious here?
TIA,
Ron
-------------------------------------
Name: Ron Barrett
E-mail: ron_barrett@corp.cubic.com
Date: 04/16/96
-------------------------------------
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1996-04-16 11:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-04-16 11:31 BASH env. variable's ron_barrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox