bug-gawk
[Top][All Lists]
Advanced

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

Re: How to deal with ASCII delimited text


From: arnold
Subject: Re: How to deal with ASCII delimited text
Date: Wed, 18 Mar 2020 03:05:50 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Wolfgang Laun <address@hidden> wrote:

> The classic record separator for *NIX-style text files is LF, which is very
> much different from RS = 0x1E. I haven't seen FS, GS, RS, US used for what
> they were intended a long time ago in the last 40 years. No utility I know
> makes use of them. You might want to think twice before you plan to
> structure your data this way.

This last statement is excellent advice. The gawk manual has examples of how
to structure data.

W.R.T. the original question, it's probably enough to set RS = "[...]+"
where ... is a list of the octal or hex values for the various characters
named.

>
> -W
>
>
> On Tue, 17 Mar 2020 at 17:37, Peng Yu <address@hidden> wrote:
>
> > Hi,
> >
> > ASCII delimited text (ADT) have for separators, FS, GS, RS, US.
> >
> > https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text
> >
> > awk only have two separators RS and FS that correspond to the last two
> > separators of ADT.
> >
> > To process ADT, is there any recommended best practice? Thanks.
> >
> > --
> > Regards,
> > Peng
> >
> >



reply via email to

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