SH: Recursive Variable Substitution
Hi!
I have the following test code fragment: Code:
#! /bin/sh Code:
test.sh: ${$B...}: Bad substitution |
Hmm. I think you are looking for eval.
Code:
A1="ZZZ" |
Quote:
|
You could possibly go one line less too:
Code:
A1="ZZZ" Edit: Use the "if" instead of "echo" line |
Quote:
Code:
$ sh -x test1.sh |
Quote:
|
Quote:
|
Quote:
|
All times are GMT -5. The time now is 06:25 PM. |