Below is a device.dev file that contains some configuration info for a specific application called ads2.
1 DEVICES {
2 GLOBAL-CONFIG {
3 framerate = "20000";
4 subframes = "0";
5 max_consec_timeouts = "10";
6 max_total_timeouts = "1000";
7 schedmode = "Standard";
8 }
9 IO-DEVICES {
10 }
11 COMPUTING-DEVICES {
12 RT_WORKSTATION x-NB-0144 = {
13 hostname = "x-x-0144";
14 ipaddress = "xxx.x.x.xx";
15 DISPLAYS {
16 main = "FDT-C-VM-0094:0.0";
17 }
18 SCHEDPARAM {
19 active = "0";
20 framerate = "20000";
21 subframes = "0";
22 max_consec_timeouts = "10";
23 max_total_timeouts = "1000";
24 }
25 }
27
28 RT_HOST xxx-c-agx-vw-89 = {
29 hostname = "xxxxx@xxxx-desktop";
30 ipaddress = "xx.xx.xx.xx";
31 SCHEDPARAM {
32 active = "0";
33 framerate = "20000";
34 subframes = "0";
35 max_consec_timeouts = "10";
36 max_total_timeouts = "1000";
37 }
38 }
39 }
40 }
I'm trying to write a bash script that accepts an input which is an IP-address and then access the device.dev file and pass it to the variable ipaddress in line 30.
So is it possible to access devices.dev file via bash script?
Thanks in advance