Groups | Search | Server Info | Login | Register
| From | Ed Morton <mortonspam@gmail.com> |
|---|---|
| Newsgroups | comp.lang.awk |
| Subject | Re: Include file ? |
| Date | 2011-04-10 16:43 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <int8ah$1ek$1@dont-email.me> (permalink) |
| References | <96dcd6f7-f7b7-4099-9008-7169b2b24585@a26g2000vbo.googlegroups.com> |
On 4/10/2011 10:12 AM, moonhkt wrote:
> Hi All
>
> One of awk script in BEGIN session, I have define 100+ field header
> title.
> e.g A[1]= "Header01" .. A[100] = "header100" ...
>
> How to shared this 100+ field header title to other awk script ? like
> shell using ". file_name" as include file ?
Why? Why not store those strings in a file and populate array A from that file
at startup, e.g.:
awk 'NR==FNR{A[$0];next} {real stuff}' stringsfile realinput
There are other alternatives too...
Ed.
Back to comp.lang.awk | Previous | Next — Previous in thread | Next in thread | Find similar
Include file ? moonhkt <moonhkt@gmail.com> - 2011-04-10 08:12 -0700
Re: Include file ? Janis Papanagnou <janis_papanagnou@hotmail.com> - 2011-04-10 17:35 +0200
Re: Include file ? arnold@skeeve.com (Aharon Robbins) - 2011-04-10 18:52 +0000
Re: Include file ? Ed Morton <mortonspam@gmail.com> - 2011-04-10 16:43 -0500
Re: Include file ? Aleksey Cheusov <vle@gmx.net> - 2011-04-27 14:50 +0300
csiph-web