Need help in replacing a variable in shell scripting

Experts,

Can someone help me with the below?

I've a variable called NSPMHOME=some_value. I would like change the value of the variable with another variable and something followed by it.

E.g
From NSPHOME=some_value to NSPMHOME=$SOMETHING/test

$SOMETHING has value /opt/tag .

The end result should be $NSPMHOME=/opt/tag/test

Thanks in advance.

NSPMHOME="some_value"
echo ${NSPMHOME}
some_value
SOMETHING="/opt/tag"
NSPMHOME="${SOMETHING}/test"
echo ${NSPMHOME}
/opt/tag/test

Not sure I understand your problem. Assuming the missing M in NSPHOME is a typo:

NSPMHOME=$SOMETHING/test
echo $NSPMHOME 
/opt/tag/test

So... what's wrong?

Erm, which is it that is correct?

Is it NSPHOME or NSPMHOME ?

Thanks blackrageous.

Is it possible to do using sed command?

---------- Post updated at 05:22 PM ---------- Previous update was at 05:21 PM ----------

oops, its a typo. It's NSPMHOME.