[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Native file exist check
From: |
Wolfgang Laun |
Subject: |
Re: Native file exist check |
Date: |
Fri, 5 Jun 2020 19:12:45 +0200 |
This regex does the trick:
RS = "[^x]|x"
-W
On Fri, 5 Jun 2020 at 17:28, Andrew J. Schorr <
aschorr@telemetry-investments.com> wrote:
> 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