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 08-31-2007
kotasateesh kotasateesh is offline
Registered User
  
 

Join Date: Aug 2005
Posts: 39
double variable declaration

i have variables with different values as below in KSH
AU_Holiday=1
SG_Holiday=0
KR_Holiday=1
JP_Holiday=0

$country_cd is the second variable which be one of 'AU' 'SG' 'KR' 'JP' which comes in a for loop.

form that i need to derive the variable like first one and check whether it is equal to 1 or not.

if [ $"$country_cd"_Holiday = "1" ]
then
do something
else
do something
fi

the above logic did not work can someone please help ?