[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Native file exist check
From: |
Andrew J. Schorr |
Subject: |
Re: Native file exist check |
Date: |
Fri, 5 Jun 2020 11:26:46 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jun 05, 2020 at 10:15:12AM -0500, Neil R. Ormos wrote:
> Peng Yu wrote:
>
> > https://stackoverflow.com/questions/29284472/awk-check-file-exists
> >
> > The following solution is shown above. But getline could potentially
> > read too much (for example processing a binary file in which a line
> > can be very long). [...]
>
> Consider whether setting RS to "." resolves the concern that getline might
> read "too much".
>
> <https://www.gnu.org/software/gawk/manual/gawk.html#gawk-split-records>
Not really: setting RS to "." matches the period character only.
But yes, setting RS to a clever value is the key.
Re: Native file exist check,
Andrew J. Schorr <=
Re: Native file exist check, arnold, 2020/06/07