Could someone maybe help me figure out how to read a txt file to output values with dependings?
My files looks like this:
IP10>lif,Identification
$R; lif,Identification
---->
$-- BLOCK 1 / 6
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rxproduct xmlns="http://septentrio.com/ns/ProductDescription/2.9">
---->
$-- BLOCK 2 / 6
<hwplatform product="AsteRx-m3 Pro+"
name="GRB0053" serialnr="3283532"
rxfullid="SN23313283532">
<mainboard type="GRB00531000AA0302"/>
<usb speed="high speed" host="disabled"/>
<rmii clock="default"/>
</hwplatform>
---->
$-- BLOCK 3 / 6
<firmware version="4.14.0" date="230522" rev="gdf7d81">
<bootloader version="4.3.0-g46ec717e83" date="700101"/>
<os version="14.0.4-g3af9964" date="230522" type="ssn-linux" model="FENRIR" upgradebaud="scs" sufformat="signed"
>
<kernel version="4.6.0-gac9cb06" date="230522"/>
</os>
<gnssfw version="6.14.7-gfc4f1d86b5" date="230517" type="std">
</gnssfw>
<failsafe version="12.0.3-gd202d26" date="220414" type="ssn-linux"/>
</firmware>
---->
$-- BLOCK 4 / 6
<files>
<permfile permid="01012690a-3283532-1"/>
<antinfo version="23.2.0" format="antex 1.4" ngs2bin="2.1" antcount="927" antwnc="2258" date="230425"/>
</files>
---->
$-- BLOCK 5 / 6
<components>
</components>
---->
$-- BLOCK 6 / 6
</rxproduct>
I need a VBS to search for Pro+ and for serialnr and output to a text file as following.
Pro+ true=P
Serialnr=only following digits.
Example if Pro+ is found: P3283532
Example if Pro+ is not found: 3283532
Im stuck where the output contains the entire lines for each match.
Ronny Gjersvold is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.