Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #41257
| Path | csiph.com!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
| Newsgroups | comp.lang.javascript |
| Subject | How to read an identified part of a huge text file? |
| Date | Sun, 2 Apr 2023 15:51:49 +0200 |
| Organization | A noiseless patient Spider |
| Lines | 24 |
| Message-ID | <u0c19l$2hc4f$1@dont-email.me> (permalink) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sun, 2 Apr 2023 13:51:49 -0000 (UTC) |
| Injection-Info | dont-email.me; posting-host="f8252982302c6ac04b7f368a173f26a6"; logging-data="2666639"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+683ffL/Kl/9w8Xf478x1d" |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
| Cancel-Lock | sha1:2jz7zOKoTquSSJhR/f+ctcsYQfo= |
| X-Mozilla-News-Host | news://news.eternal-september.org:119 |
| X-Enigmail-Draft-Status | N1110 |
| Xref | csiph.com comp.lang.javascript:41257 |
Show key headers only | View raw
I want to read identified content from a huge text file that resides in
the file system. (My javascript code is embedded in a HTML page. I am
running all code client side and have no application servers or data
base systems running.)
I've found a suggestion using 'require("fs")' but the samples required
to load the whole file content so doesn't seem to fit for my megabytes
large data file which I strictly want to avoid loading as a whole.
My data file is actually structured as <key> <TAB> <text-data> lines
and I just want to extract the <text-data> given the respective <key>.
Is there some simple standard way to achieve that extraction?
The second question is whether it is possible to find the <key>s given
a text-match (a string match or ideally a regular expression match) on
the respective <text-data> on the external file?
For a solution/workaround to both questions it might be also useful to
call an external extractor (awk, perl, ...) from javascript and read in
the output of such an external tool invocation. - Is that possible?
Thanks for any hints.
Janis
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
How to read an identified part of a huge text file? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2023-04-02 15:51 +0200
Re: How to read an identified part of a huge text file? Jon Ribbens <jon+usenet@unequivocal.eu> - 2023-04-02 14:49 +0000
Re: How to read an identified part of a huge text file? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2023-04-02 20:05 +0200
Re: How to read an identified part of a huge text file? Jon Ribbens <jon+usenet@unequivocal.eu> - 2023-04-02 19:58 +0000
Re: How to read an identified part of a huge text file? JJ <jj4public@outlook.com> - 2023-04-03 06:08 +0700
Re: How to read an identified part of a huge text file? V <vvvvvvvvvvvvvvvvvvvv11111@mail.ee> - 2023-04-03 06:55 -0700
Re: How to read an identified part of a huge text file? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-04-04 17:59 -0700
csiph-web