Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!mcsun!hp4nl!targon!ruud From: ruud@targon.UUCP (Ruud Harmsen) Newsgroups: comp.unix.questions Subject: indirect shell-vars Message-ID: <627@targon.UUCP> Date: 11 Sep 89 10:29:28 GMT Reply-To: ruud@targon.UUCP (Ruud Harmsen) Organization: Nixdorf Computer BV., SWP, P.O. Box 29,Vianen, The Netherlands Lines: 12 I'm looking for a way to reference a variable in the Bourne-shell, whose name is given in another variable. I found the following solution using a sub-shell myself, but it seems rather clumsy:. export x1; x1=one export x2; x2=two echo which var\? read xx sh -c "echo \$x`echo $xx`" Are there any better/faster/shorter ways? Perhaps using "eval", but also executes the string, which is too much.