bug-gawk
[Top][All Lists]
Advanced

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

Re: lint warning: unnecessary mixing of `>' and `>>'


From: arnold
Subject: Re: lint warning: unnecessary mixing of `>' and `>>'
Date: Mon, 23 Oct 2023 05:38:31 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Wolfgang Laun <wolfgang.laun@gmail.com> wrote:

> It's not unusual that the same program could be used for writing a file
> from scratch, or to append to it.
> Except for the first print statement (i.e., the open), the code would be
> the same. How would I
> write it in order to remain consistent and in good style?
>
> Wolfgang

The awk program should simply print[f] to standard output and the
decision as to > or >> should be made at the shell level.

Arnold



reply via email to

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