[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FS prob.
From: |
Stepan Kasal |
Subject: |
Re: FS prob. |
Date: |
Tue, 21 Jan 2003 08:43:29 +0100 |
User-agent: |
Mutt/1.2.5.1i |
Hello,
On Tue, Jan 21, 2003 at 03:12:07PM +1000, Travis Johnston wrote:
> octopus# cat test
> aharvey:students:Amber Harvey:/bin/bash:students:c132s31:
> jgregor:students:Jonathan Lucas Gregor:/bin/bash:students:c132s31:
>
> octopus# cat test | gawk '{FS=":"; print $1 "--" $6}'
> aharvey:students:Amber--
> jgregor--c132s31
this is correct behaviour. You've changed FS _after_ the first line has
been split.
What you probably meant was this:
cat test | gawk 'BEGIN{FS=":"} {print $1 "--" $6}'
or
cat test | gawk -F: '{print $1 "--" $6}'
or
cat test | gawk '{print $1 "--" $6}' FS=:
> This is a multi-part message in MIME format.
Can you please send text mail as plain text? That saves time for me
and for many others. Please see "Internet mail: living with Microsoft
Outlook" <http://www.lemis.com/email/fixing-outlook.html>. Thanks.
Regards,
Stepan Kasal
- FS prob., Travis Johnston, 2003/01/21
- Re: FS prob.,
Stepan Kasal <=