From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076331021323.tru64-unix-managers.marc@archive.invalid> From: ron_barrett () corp ! cubic ! com Date: Tue, 16 Apr 1996 11:31:18 +0000 To: tru64-unix-managers Subject: BASH env. variable's X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076331021323 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 -------------------------------------