variable list of variables

Jonathan I. Kamens jik at athena.mit.edu
Mon Mar 11 10:33:12 AEST 1991


Use "eval" to get what you want.  For example:

$ jik_files="a.c b.c c.c"
$ echo $USER
jik
$ for file in `eval echo '$'${USER}_files`; do echo $file; done
a.c
b.c
c.c
$

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.shell mailing list