Groups | Search | Server Info | Login | Register
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ed Morton <mortonspam@gmail.com> |
| Newsgroups | comp.lang.awk |
| Subject | Re: Include file ? |
| Date | Sun, 10 Apr 2011 16:43:43 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 19 |
| Message-ID | <int8ah$1ek$1@dont-email.me> (permalink) |
| References | <96dcd6f7-f7b7-4099-9008-7169b2b24585@a26g2000vbo.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sun, 10 Apr 2011 21:43:46 +0000 (UTC) |
| Injection-Info | mx03.eternal-september.org; posting-host="6WHsJuDWcUen9TKy88CeTQ"; logging-data="1492"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+tMcZQpEeUl/0hcWxd6c9y" |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
| In-Reply-To | <96dcd6f7-f7b7-4099-9008-7169b2b24585@a26g2000vbo.googlegroups.com> |
| Cancel-Lock | sha1:HK9V95fusROa6cwAGg2JcsxNPWI= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.awk:149 |
Show key headers only | View raw
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