On Fri, 1 Dec 2000 [EMAIL PROTECTED] wrote:

>      Peter:
>      
>      Hi. The contents of one of these files look some kind of input files 
>      to something which initialises the environment. It is not valid DCL 
>      and not output from SHOW LOGICAL.
>      
>      Upon looking at the content more, it looks like the important bits are 
>      of the format:
>      
>      <logical>\t:\t<value>\n
>      
>      where <logical> is something which winds up being a logical, and the 
>      value winds up being its value. I suspect it is something we did in 
>      house, and there is some DCL parsing it (somewhere!), and the format 
>      looks simple enough to tackle with one of the "Text" modules, or even 
>      just plain perl.

here is a one liner that might do what you want:

$ show logical foo
%SHOW-S-NOTRAN, no translation for logical name FOO
$ show logical buz
%SHOW-S-NOTRAN, no translation for logical name BUZ
$ type env.file
FOO     :       Bar
BUZ     :       A string with spaces
$ perl -ne "($l,$t)=split(/\t:\t/,$_);eval{$ENV{$l}=$t;};print`show log foo,buz`" 
env.file
   "FOO" = "Bar." (LNM$PROCESS_TABLE)

%SHOW-S-NOTRAN, no translation for logical name BUZ
   "FOO" = "Bar." (LNM$PROCESS_TABLE)

   "BUZ" = "A string with spaces." (LNM$PROCESS_TABLE)

HTH

Peter Prymmer


Reply via email to