how to take the substring value into a variable

I am trying something like below. But unfortunately i am missing sthg here.
$ HOSTEXT=hostname | awk '{print substr ($0,7)}'
$ echo $HOSTEXT

$

Suggestioins/Solutions will very much be appreciated.
Thanks in advance,
best-dyno.

try

HOSTEXT=`hostname | awk '{print substr ($0,7)}'`

Thanks a lot..it Worked!!