Unix Programming - Variables Value (ksh)

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2008 > Variables Value (ksh)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Variables Value (ksh)
shulamitm

2008-01-01, 7:36 am

Hello!

In ksh script (SUN OS), I need to get the value of variable value.
For example:

aa=bb
and bb=hello

I have only the 'aa' variable, so how can I get the 'hello' strings
(the value of bb) ?


thanks in advance!

Måns Rullgård

2008-01-01, 7:36 am

shulamitm <shulamitmi@bezeq.com> writes:

> Hello!
>
> In ksh script (SUN OS), I need to get the value of variable value.
> For example:
>
> aa=bb
> and bb=hello
>
> I have only the 'aa' variable, so how can I get the 'hello' strings
> (the value of bb) ?


eval cc=\$$aa

should work in any Bourne-like shell.

--
Måns Rullgård
mans@mansr.com
shulamitm

2008-01-01, 7:36 am

On Jan 1, 1:03=A0pm, M=E5ns Rullg=E5rd <m...@mansr.com> wrote:
> shulamitm <shulami...@bezeq.com> writes:
>
>
>
>
> eval cc=3D\$$aa
>
> should work in any Bourne-like shell.
>
> --
> M=E5ns Rullg=E5rd
> m...@mansr.com


thanks a lot!
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com