bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Field separator ignored for first record.


From: Les Seeley
Subject: Field separator ignored for first record.
Date: Sat, 23 Oct 2004 01:03:34 -0600

Hello,

Why does:

gawk -F : '{ print $1 }' /etc/shadow

and 

gawk '{FS=":"; print $1 }' /etc/shadow 

produce different results?

The execution of gawk '{FS=":"; print $1 }' /etc/shadow  ignores the
field separators in the 
first record of the file and prints the while record.

awk, and nawk on other systems do not present this problem.

System:

Linux hostname 2.6.5-7.111-smp #1 SMP Wed Oct 13 15:45:13 UTC 2004 i686
i686 i386 GNU/Linux

SuSE 9.1 pro. 

Gawk version: 

GNU Awk 3.1.3
Copyright (C) 1989, 1991-2003 Free Software Foundation.

I also downloaded the latest version and compiled it and it displayed
the same results.


Thanks
   Les.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]