[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] gawk deal with file separator
From: |
arnold |
Subject: |
Re: [bug-gawk] gawk deal with file separator |
Date: |
Fri, 13 Sep 2019 01:20:49 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Peng Yu <address@hidden> wrote:
> Hi,
>
> ASCII code has the FS (file separator) character. This means that
> multiple files can be streamed one after another separated by FS. If
> each file still is a TSV, this means that the input stream should have
> three levels. But gawk only consider the input stream of two levels.
> What is the best way to process the input with files separated by FS
> in ASCII? Thanks.
>
> --
> Regards,
> Peng
I really don't understand what you're trying to do or why you
want to separate files by FS.
Awk already gives you the tools to know when a file boundary
has been crossed. Read the manual to learn about FNR and FILENAME.
Additionally, gawk gives you BEGINFILE and ENDFILE patterns.
I see no need to add special handling to gawk for the ASCII FS character;
it's not used for that purpose in any modern (or even ancient) system
that I know of.
Nor do I even know *how* I'd add such support.
Arnold