Subject: | |
From: | |
Reply To: | |
Date: | Tue, 23 Oct 2001 16:35:44 -0400 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Donna Garverick wrote:
>
> i've got a simple little text file with two pieces of
> information on each record. the first 'word' (piece of
> information) could be considered as a key value. that is --
> another process will be examining this file looking for a
> match on the first field. (and btw, since i know the
> data....most of the time the match will fail....). if a
> match is found, i need the 2nd 'word' (piece of information)
> placed into a ci variable. sound rather simple....except
> that last piece -- getting the information from the file
> into a variable.
>
awk is cool, but here is an non-posix solution:
setvar keyval,"whatever"
file x=input file
comment Output file must be same record type as input file
file y=$newpass ;rec=-80,,f,ascii ;nocctl
run fcopy.pub.sys ;info='from=x ;to=*y ;subset="!keyval",1'
reset x
file y=$oldpass
if finfo("*y","eof") > 0
input tgtval<*y
setvar tgtval,rht(tgtval,-len(keyval)-1)
showvar tgtval
endif
reset y
HTH
Campbell Fethers
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|