Re: [gawk] Handling variants of CSV input data formats

Liste des GroupesRevenir à cl awk 
Sujet : Re: [gawk] Handling variants of CSV input data formats
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.awk
Date : 27. Aug 2024, 17:23:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vakuhv$326rs$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 27.08.2024 13:45, Ed Morton wrote:
On 8/26/2024 8:39 PM, Janis Papanagnou wrote:
>
I've missed that there was an explicit
$ export POSIXLY_CORRECT=1
set on the very top of these examples. Gee!
 
POSIXLY_CORRECT=1 (or equivalently `--posix` aka `-P`) affects numbers
in the input your script reads (as shown in the previous post) and
strings being converted to numbers in your code, it doesn't affect
literal numbers in the source code for your script that awk reads.
 
In the source code the decimal separator for a literal number (as
opposed to a string being converted to a number) is always `.`.
 
You can't use, say, a comma as the decimal separator in a literal number
because a comma already means something in the awk syntax, e.g. `print
4,321` means the same as "print 4 OFS 321`.
 
[examples and explanations]

Thanks.

Janis


Date Sujet#  Auteur
25 Aug 24 * [gawk] Handling variants of CSV input data formats11Janis Papanagnou
26 Aug 24 `* Re: [gawk] Handling variants of CSV input data formats10Ed Morton
26 Aug 24  `* Re: [gawk] Handling variants of CSV input data formats9Janis Papanagnou
26 Aug 24   +* Re: [gawk] Handling variants of CSV input data formats4Manuel Collado
27 Aug 24   i`* Re: [gawk] Handling variants of CSV input data formats3Janis Papanagnou
27 Aug 24   i `* Re: [gawk] Handling variants of CSV input data formats2Manuel Collado
27 Aug 24   i  `- Re: [gawk] Handling variants of CSV input data formats1Janis Papanagnou
27 Aug 24   `* Re: [gawk] Handling variants of CSV input data formats4Ed Morton
27 Aug 24    `* Re: [gawk] Handling variants of CSV input data formats3Janis Papanagnou
27 Aug 24     `* Re: [gawk] Handling variants of CSV input data formats2Ed Morton
27 Aug 24      `- Re: [gawk] Handling variants of CSV input data formats1Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal