Script Error

Hi ,

I am facing one strange issue with the shell scripting.

below is the sample of the same. Although i am assigning the value its not echo the same.

#!/bin/sh -x

libname=libdbs

export $libname

${libname}_CPP_SRC=1

export ${libname}_CPP_SRC

echo ${libname}_CPP_SRC

I want this to be run linux as well on solaris.
Thanks in advance for the help.

_Bunti

Variables have to be declared at compile time.

${libname}_CPP_SRC=1

Here variable is formed when the script is executed