Hello
Can someone help, how would I do the following
I have thousands of text files, with the following data in each of them
object-group network clisys_lca6_nets
network-object 192.168.112.64 255.255.255.224
network-object host 192.168.112.63
network-object host 192.168.112.57
network-object host 192.168.112.58
network-object host 192.168.112.59
network-object host 192.168.112.60
network-object host 192.168.112.95
network-object host 192.168.112.96
network-object host 192.168.112.97
network-object host 192.168.112.98
object-group network clisys_ams3_nets
network-object 10.75.242.192 255.255.255.224
network-object host 10.75.242.234
network-object host 10.75.242.235
network-object host 10.75.242.47
network-object host 10.75.242.53
network-object host 10.75.242.115
network-object host 10.75.242.117
network-object host 10.75.242.48
network-object host 10.75.242.54
network-object host 10.75.242.124
network-object host 10.75.242.116
network-object host 10.75.242.121
network-object host 10.75.242.125
network-object host 10.75.242.120
network-object host 10.75.242.138
object-group network rwc_sseti_vip_clients
group-object clisys_lca6_nets
group-object clisys_ams3_nets
object-group network rwc_sseti_vip
network-object host 192.168.122.22
object-group service rwc_sseti_vip_svcs tcp
port-object range 4000 4004
object-group network gurwin_user
network-object host 10.96.2.150
object-group network smarples_user
network-object host 10.96.2.151
object-group network jrennie_user
network-object host 10.96.2.152
object-group network jwoods_user
network-object host 10.96.2.153
I want to be able to search through all the files and get all the "unique", entries and out put the file it was found in and the entrie
i.e
c:\temp\file1.txt
object-group network jwoods_user
network-object host 10.96.2.153
c:\temp\file1453.txt
object-group network jrennie_user
network-object host 10.96.2.152
The script needs to loop through each file and find all strings starting with
object-group
capture all lines as part of this array until it finds the next line starting with
object-group
sorry if I get my terminology wrong here, (as still learning) save it as a dynamic array,
Then search through other text files in folder, looking for all unique arrays ??
I really hope this makes sense (it does in my mind?)
regards
Jim