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

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

Re: Possible bug in gawk: local FS not used


From: Dave B
Subject: Re: Possible bug in gawk: local FS not used
Date: Tue, 12 May 2009 00:42:30 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090420)

Jean-Philippe Guérard wrote:

>> Depending on your needs, you may be able to obtain the same result by saving
>> FS, changing it, and restoring it afterwards.
> 
> That's what I did in the end :) But I spent a lot of time wondering why 
> the value of FS was not taken in account.

And (obviously) you can always split a line on whatever separator you choose
by using split(), without the need to touch FS, although that way you don't
get the fields in the special variables.

> An error message would really have been helpful here, especially as 
> printing the FS value gave me the expected result. Otherwise, nothing to 
> say, the gawk behaviour was correct.
> 
> Thanks again for your help.

You're welcome.

-- 
D.




reply via email to

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