bug-gawk
[Top][All Lists]
Advanced

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

Re: Field separator error


From: arnold
Subject: Re: Field separator error
Date: Tue, 22 Dec 2020 23:48:13 -0700
User-agent: Heirloom mailx 12.5 7/5/10

Hello.

Roberto do Rego <dp.rrego@gmail.com> wrote:

> Hello guys, an error occurred when printing some fields in a file 
> converted to utf-8, but with the line break from "dos", when the 
> coverter to "unix" the problem disappeared.

You can use

        BEGIN { RS = "\r?\n" }

and then gawk will work with data files that are from either DOS
or Unix.  It already ignores CR characters in program source files.

> In addition, it is necessary to type the full path to the file or gawk 
> cannot find it. Unfortunately this is making the use of scripts on 
> multiple platforms unviable which was simple until version 4.0.

This is not clear. Are you talking about finding source files,
or data files?  You may need to adjust the AWKPATH environment
variable if you have it set.

Please clarify further what you are seeing.

Thanks,

Arnold



reply via email to

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