[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: echo "" | gawk '{s=1.9; print s}'
From: |
Aharon Robbins |
Subject: |
Re: echo "" | gawk '{s=1.9; print s}' |
Date: |
Wed, 08 Jun 2005 08:34:09 +0300 |
Greetings. Re this:
> Date: Tue, 07 Jun 2005 11:17:23 +0200
> From: Naulin Francois <address@hidden>
> Subject: echo "" | gawk '{s=1.9; print s}'
> To: address@hidden
>
>
> This gawk command :
>
> echo "" | gawk '{s=1.9; print s}'
>
> result in :
>
> 1.9
> (dot) with GNU Awk 3.1.1 (in RedHat 9)
>
> and :
>
> 1,9
> (comma) with GNU Awk 3.1.3 (in Fedora Core 3)
>
> Why ?
>
> Thank You !
Gawk is now (per POSIX) sensitive to the locale; it use's the locale's
decimal point for formatting output. To get the traditional behavior,
use
export LC_ALL=C
in the environment (e.g., from Bash).
I am unconvinced that this aspect of POSIX conformance is a general
improvement, but it's probably too late to go back to the earlier
behavior, and at least it's standards compliant.
Arnold