I couldn't see any major issues in your code so I entered it into my system :
Code:
#!/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 "V_DATE=$V_DATE"
echo "V_D=$V_ID"
echo "V_NAME=$V_NAME"
echo "FILE_NAME=$FILE_NAME"
exit
And ran it which produced the following which looked correct :
Code:
V_DATE=2007-11-30
V_D=789
V_NAME=john_789_has_2007-11-30_s
FILE_NAME=john_789_has_2007-11-30_s
Can you check you're using double quotes everywhere - single quotes won't translate the variable values ie make sure you type " and not ' or '' (which is actually two single quotes typed one after the other).
Another point is that it would be easier to read if you had FILE_NAME=$V_NAME rather than printing out V_NAME and capturing the output. Even better might be to just use one variable rather than two holding the same value.
Also where did the * come from in FILE_NAME - I can't see how that could of been set using your code.
Mike