How to combine two variable strings?

Hi,

I have two variables

 
pscmd="ps -exf | grep "
 
pid=15560

When I say

 
var=$( $pscmd $pid )
echo $var

it shows output of all processes on the OS rather than just 15560.

So, i guess it only executes "ps -exf | grep " rather than "ps -exf | grep 15560"

Can you please let me know whats wrong ?

I'm on HP -UX

var=$( eval "$pscmd $pid" )

This may work

var=$(ps -exf | grep $pid)