here is the thing i am trying to do . I have a system variable called $OOCEA_INCOMING_READY, I want to be able to construct this variable name inside the script and use it. I am passing part of the variable name OOCEA as parameter but i am not able to use this variable after constructing the name , see below :
----------------- code a.sh ----------------------------------------------
#!/usr/bin/ksh
set -x
AGENCY=$1
AGENCY_CODE=$2
FILE_TYPE=$3
#
echo \$${AGENCY}_INCOMING_READY
ls \$${AGENCY}_INCOMING_READY
ls $OOCEA_INCOMING_READY
exit
-------------------------------------------------------------------------
./a.sh OOCEA 05 ITRN
+ AGENCY=OOCEA
+ AGENCY_CODE=05
+ FILE_TYPE=ITRN
+ echo $OOCEA_INCOMING_READY <<<< does not work
$OOCEA_INCOMING_READY
+ ls $OOCEA_INCOMING_READY <<<< does not work
$OOCEA_INCOMING_READY: No such file or directory
+ ls /u02/oocea/incoming/ready <<< this works if i hard code the
ITRN_20090430_0030.ZIP ITRN_20090430_1230.ZIP variable name .
+ exit