Substituting the values

Hi Gurus

this is working finee with tested values

#!/bin/ksh

V_DATE="2007-11-30"
V_ID=789
V_NAME="john_${V_ID}_has_${V_DATE}_s"

FILE_NAME=`echo ${V_NAME}`

echo ${FILE_NAME}

Buttt the problem is

the first two values will come dynamically

and the file will looks like "john_${V_ID}_has_${V_DATE}_s*" soo i have to get the file from remote system and i have to further processs based on the date and ID

"filename" i am storing it in varaible and ID and Date aswell

But when i `echo ${FILE_NAME}` it prints

john_${V_ID}_has_${V_DATE}_s*

its nt replacing the values

can u give the solution for this...

Try this:

eval "FILE_NAME=$(echo $V_NAME)"

echo ${FILE_NAME}
V_NAME='john_${V_ID}_has_${V_DATE}_s'

V_DATE="2007-11-30"
V_ID=789

eval "FILE_NAME=\"$V_NAME\""

echo "$FILE_NAME"