composing a variable name from another variable;

Hi Guys,

I have the below;

    case $1 in
            checkvob\) checkvob\_log=$log\_loc/cchealth/$1/$1.$date_stamp.$$ ;;
            dbcheck\) dbcheck\_log=$log\_loc/cchealth/$1/$1.$date_stamp.$$ ;;
            lock\) lock\_log=$log\_loc/cchealth/$1/$1.$date_stamp.$$ ;;
            opinfo\) opinfo\_log=$log\_loc/cchealth/$1/$1.$date_stamp.$$ ;;
            spacemon\) spacemon\_log=$log\_loc/cchealth/$1/$1.$date_stamp.$$ ;;
            logalert\) logalert\_log=$log\_loc/cchealth/$1/$1.$date_stamp.$$ ;;
    esac

...but I think this should be possible in one line, however I need to find a way to get the variable name to be composed from the $1 variable...e.g.

$1_log=$log_loc/cchealth/$1/$1.$date_stamp.$$

Any ideas? I'm in ksh?

Cheers everso,

Calota

Something like

if [[ "$1" = "checkvob" || "$1" = "dbcheck" || .. || .. || .. ]] ; then
 $1_log=$log_loc/cchealth/$1/$1.$date_stamp.$$ 
fi ;

Hi, sorry to reply to my own post but I found my answer as below...

eval `echo ${1}_log=$log_loc/cchealth/$1/$1.$date_stamp.$$`

Kind Regards

Cath