Your command means
OHOME=echo and while that assignment is in place, run the command
$OHOME which of course is not a valid command.
To capture the output of a command, put it in backticks (ASCII 96, not regular straight quotes):
Code:
O_BASE=`echo $OHOME | awk -F"/" '{for(i=2;i<=NF;i++) {if($i=="product"){exit;} a=a"/"$i; }} '`