new scripter

Hello all,

new to scripting (and unix!) here. Im trying to write a script for something i have to do for work and for some reason it just isnt working.

im using the ksh.

Can someone please tell me why

$PRODUCT=$1

CONFIG=./etc/$PRODUCT_config.xml

print Using $CONFIG

prints "Using ./etc.xml" ?

Try this:

$PRODUCT=$1

CONFIG=./etc/${PRODUCT}_config.xml

print Using $CONFIG

The shell is interpreting PRODUCT_config as the variable name rather than PRODUCT, because _ is allowed to be part of variable name.