'''
python
import os
import re
import pandas as pd
#from openpyxl import Workbook
#wb = Workbook()
#ws = wb.active
one={}
all1=[]
columns = ['sysname', 'stp bridge-address']
txt_files = []
for root, dirs, files in os.walk(os.getcwd()):
for file in files:
if file.endswith(".txt"):
if file.startswith("NFV"):
txt_files.append(os.path.join(root, file))
elif file.startswith("GD"):
txt_files.append(os.path.join(root, file))
for file_name in txt_files:
with open(file_name, 'r') as file:
one={}
for line in file.readlines():
if line.startswith("sysname"):
one["sysname"]=line.replace("sysname", '').replace('\n', '').strip()
if line.startswith("stp bridge-address"):
one["mac"]=line.replace('stp bridge-address', '').replace('\n', '').strip()
break
if one.get("mac") is not None:
all1.append(one)
df = pd.DataFrame(all1)
df.to_excel('result.xlsx', index=False)
'''