Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Variable Name from another Variable 1

Status
Not open for further replies.

simpson

MIS
Oct 23, 2001
58
CA
I would like to create and assign a value to a variable, the name of the variable will be derived from another variable. is this possible under ksh.

Thanks
 
What do you mean by "derived" ?

Perhaps something like this:
Code:
$ X=test
$ eval AA$X=1234567890
$ echo $AAtest
1234567890
$ eval echo \$AA$X
1234567890
$ echo \$AA$X
$AAtest
hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top