Re: Awk Question - Again
From: Christoph Gysin (fr33z3_at_gmx.ch)
Date: 10/29/04
- Next message: Christoph Gysin: "Re: Awk Question - Again"
- Previous message: Ed Morton: "Re: Awk Question - Again"
- In reply to: Arthur: "Awk Question - Again"
- Next in thread: Christoph Gysin: "Re: Awk Question - Again"
- Reply: Christoph Gysin: "Re: Awk Question - Again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Oct 2004 16:54:12 +0200
Arthur wrote:
> 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
How about:
name=`echo $label1 | awk '{print($1)}'`
Christoph
- Next message: Christoph Gysin: "Re: Awk Question - Again"
- Previous message: Ed Morton: "Re: Awk Question - Again"
- In reply to: Arthur: "Awk Question - Again"
- Next in thread: Christoph Gysin: "Re: Awk Question - Again"
- Reply: Christoph Gysin: "Re: Awk Question - Again"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]