The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-26-2009
chaitanyapn chaitanyapn is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 7
Extracting dynamic values

Hi,

I am stuck with extracting values by combining 2 dynamically extracted values.

The code goes like this

#!/usr/bin/ksh

ID1="abcd"
i=1 #this is a dynamic value and keeps on changing
b="ID" #this is static

now i want the value of ID1 variable.

like echo $b$i

But echo $b$i gives "ID1" and not the value in ID1.

Is there a way to extract the value of ID1

Thanks
Chaitanya