HP3000-L Archives

October 2001, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Donna Garverick <[log in to unmask]>
Reply To:
Donna Garverick <[log in to unmask]>
Date:
Tue, 23 Oct 2001 16:48:45 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (49 lines)
Ron Wuerth wrote:

> Okay Donna,

drum roll, please :-)

> Here's the awk solution
> (thanks again Ken, Jeff & Mark)

(absolutely!)

> KEYVAL is real simple
>
> PARM key=0
> SETVAR KEYVAL 0         #just for testing can get rid of it
> SHOWVAR KEYVAL        #just for testing can get rid of it
>  /bin/awk "-f KVAWK amatch=!key" < DATAFILE
> SHOWVAR KEYVAL        #just for testing can get rid of it

'amatch'??  (where is that in o'reilly's unix cd?  i can't find
it....)

> Here is KVAWK
>
> { key[++j]=$1; val[j]=$2; }
> END {
>     for(i in key) {
>        if (key[i]==amatch) {
>          system("callci SETVAR KEYVAL \\'"val[i]"\\'");
>        }
>     }
> }

ok....i'm lost.  in the first script you're passing in(??)
amatch...then why is it in the awk 'program'?

> HTH

it sure does.  thank you!!           - d

--
Donna Garverick     Sr. System Programmer
925-210-6631        [log in to unmask]

>>>MY opinions, not Longs Drug Stores'<<<

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2