Path: utzoo!utgpu!attcan!uunet!cos!revell From: revell@cos.com (James R. Revell) Newsgroups: comp.unix.questions Subject: using shell variables as pointers Keywords: bourne shell advice Message-ID: <8196@cos.com> Date: 5 Oct 88 15:57:22 GMT Organization: Corporation for Open Systems, McLean, VA Lines: 22 I need to write some shell scripts that can use shell variables as pointers to other shell variables. I came up with one construct for doing this, but I'm hoping that someone else has found a better one. I would prefer using Bourne shell. Here is an example of what I came up with: bin="bar/bin" src="moo/src" dir="bin" where="foo/`eval echo \\$${dir}`" ( where is now "foo/bar/bin" ) dir="src" where="foo/`eval echo \\$${dir}`" ( where is now "foo/moo/src" ) -- James R. Revell Jr. (8^{~ Corporation for Open Systems (+1 703 883 2721) revell@cos.com _or_ {uunet,sundc,decuac,hqda-ai,hadron}!cos!revell The opinions expressed are not necessarily those of the Corporation for Open Systems, its members, or of any standards body.