[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: minor documentation suggestion for FS values and "whitespace" in gen
From: |
arnold |
Subject: |
Re: minor documentation suggestion for FS values and "whitespace" in general |
Date: |
Tue, 24 Mar 2020 08:43:23 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Ed Morton <address@hidden> wrote:
> Thanks Arnold. I assume you meant to say whitespace is ' ' and '\t' and
> '\n' on UNIX at least given:
>
> $ printf 'a b\nc\n' | awk -v RS='#' '{print NR, NF; for (i=1; i<=NF;
> i++) print i, "<" $i ">"}'
> 1 3
> 1 <a>
> 2 <b>
> 3 <c>
Fine.
> but is that still true on Windows or is it ' ' and '\t' and '\r\n' there
> or something else? I don't have a Windows environment to test it in.
The only code in gawk that explicitly relates to '\r' is when reading source
files.
Otherwise, gawk on windows expects that input files are either Unix style or
that they
are opened in the mode that turns \r\n into \n.
Arnold