[NTLUG:Discuss] sh coding problem
Fred James
fredjame at concentric.net
Fri Mar 23 16:06:52 CST 2001
My problem is not the logic control, but rather if
the environmental variable MOM_CHAIR is set to "pine"
var1 = MOM
how can I put $var1 together with "_CHAIR" and the use it get the value
"pine"?
I keep getting "MOM_CHAIR"
merlin wrote:
> On Fri, 23 Mar 2001, Fred James wrote:
>
> > This is Bourne shell scripting.
> >
> > Given similar environment variables such as
> > MOM_CHAIR
> > POP_CHAIR
> > KID_CHAIR
> > I want to build the variable name on the fly and retrieve the value to
> > base a decision on in my script.
> > Hints?
> >
> >
> > --
> > Consider Fractals
> > a large, calm, black cat
> > who seems often to be my spiritual leader.
>
> Case statement? I'm not sure if bsh has an eval type function. But, you
> could just case/esac it.
>
> --
> Merlin
>
> Without question, the greatest invention in the history of mankind is
> beer. Oh, I grant you that the wheel was also a fine invention, but
> the wheel does not go nearly as well with pizza.
> --Dave Barry
>
> _______________________________________________
> http://ntlug.org/mailman/listinfo/discuss
--
Consider Fractals
a large, calm, black cat
who seems often to be my spiritual leader.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ntlug.org/pipermail/discuss/attachments/20010323/e3cb4ac3/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fredjame.vcf
Type: text/x-vcard
Size: 150 bytes
Desc: Card for Fred James
Url : http://ntlug.org/pipermail/discuss/attachments/20010323/e3cb4ac3/fredjame.vcf
More information about the Discuss
mailing list