| Author | Help required for Open VMS Scripting | 
| tejasdunk Member
 
 Posts: 2
 Joined: 18.10.11
 | 
| Posted on October 18 2011 04:37 |  |  | 
| Sorry to add my question here but I didn't find the right category to add it. I am having a very hard time with scripting in OPEN vms
 I have a certain output in a file called test.txt .For example :
 
 [WWEWE@http-lx-as code]$ cat test.txt
 ** Configuration for file "MULTINET:NETWORK_DEVICES.CONFIGURATION" **
 
 Device                           Adapter   CSR Address  Flags/Vector
 
 ------                           -------   -----------  ------------
 
 se0  (Shared VAX/VMS Ethernet)   -NONE-    -NONE-       -NONE-
 
 s10  (Serial Line IP)            -NONE-    -NONE-       -NONE-
 
 dn0  (IP over DECNet link)       -NONE-    -NONE-       -NONE-
 ==========================================================================================
 I have written a script in Linux which helps to pick up all the information under the device column in this case se0,s10,dn0.
 Can we do a similar thing in OPEN VMS
 
 The Linux script is as follows :
 SCRIPT :
 
 for i in `cat test.txt 2>/dev/null |egrep '^[a-z]' |grep -v '\*\*' | awk '{print $1}'`
 > do
 >     echo Begin-interface: $i
 > done
 
 
 OUTPUT :
 
 Begin-interface: se0
 Begin-interface: s10
 Begin-interface: dn0
 
 Let me know if it can be achieved,
 Thanking you in advance
 Tejas
 | 
|  | 
| Author | RE: Help required for Open VMS Scripting | 
| Bruce Claremont Member
 
 Posts: 623
 Joined: 07.01.10
 | 
| Posted on October 19 2011 10:01 |  |  | 
| Yes, it can be achieved.  Take a look at SEARCH and Lexical functions. | 
|  | 
| Author | RE: Help required for Open VMS Scripting | 
| Bruce Claremont Member
 
 Posts: 623
 Joined: 07.01.10
 | 
| Posted on October 19 2011 10:02 |  |  | 
| Suggest moving this thread to one of the software forums. | 
|  |