[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:28:23 -0400 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jun 05, 2020 at 10:25:55AM -0500, Neil R. Ormos wrote:
> 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>
> >
>
> CORRECTION: Consider whether setting RS to ".." resolves the concern that
> getline might read "too much".
>
> At least for gawk.
Yes -- that works well. I had tried ".*", which does not work, for reasons that
are not obvious to me.
Re: Native file exist check, Andrew J. Schorr, 2020/06/05
Re: Native file exist check, arnold, 2020/06/07