Awk Question

From: Arthur (amerar_at_iwc.net)
Date: 10/29/04


Date: 29 Oct 2004 06:21:22 -0700

Hi All,

I cannot get this simple 1 lineer to work:

name=`echo $label1 | awk '{print substr($label1,1,index($label1," "))}'`

I am receiving this error:

awk: Field $() is not correct.
 The input line number is 1.
 The source line number is 1.

My input looks like this:
JOHN_DOE 255
JANE_DOE 160

I'm sure it has to do with the quotes or something........any help please?

Thanks,

Arthur