[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] variable variables in bash/ksh?
- Subject: [ale] variable variables in bash/ksh?
- From: jb at devsea.com (John Wells)
- Date: Mon Apr 19 09:44:36 2004
Guys,
I'm trying to figure out a way to use, to borrow from PHP, variable variables in shell.
For example, consider the following:
XYZ="ABC"
ABC=123456
# in php, I can do the following and get "123456" as the result, so it
# first evals XYZ to get ABC, and then applies the second $ to ABC to
# get the value of $ABC
echo $$XYZ
Anyone know how to do this in bash or ksh? Seems like something I once knew, but it escapes me now...
Thanks,
John