tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Crontab bi-weekly

pchang@cybersource.com ▻

How to dynamically make variables

In article <7up6f8$gg7$1@buty.wanadoo.nl>, Corbeau <kraay@dds.nl> wrote:
>A=<command>
>New$A=ok
>
>So, if A is foo, a new variable "Newfoo" is made with the value "ok" .

rc is particularly good at these.

    ; A = foo
    ; New^$A = ok
    ; whatis Newfoo
    Newfoo=ok
    ; echo $(New^$A)
    ok

Tim.
--
Tim Goodwin   | "People think [ W. Gibson is ] hi-tech because his prose
Leicester, UK | is as pleasant to read as a C++ program." -- JT

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: How to dynamically make variables
Date: 28 Oct 1999 12:41:48 +0100
Organization: University of Leicester, UK
Message-ID: <7v9cqi$kb8$1@ltpcg.star.le.ac.uk>
References: <7up6f8$gg7$1@buty.wanadoo.nl>

△ comp.unix.shell △

◅ Crontab bi-weekly

pchang@cybersource.com ▻