matekasse/Website/create_db_restore_log.py

13 lines
246 B
Python
Raw Normal View History

2023-11-24 19:11:26 +00:00
import sys
filename = sys.argv[1]
db_log = []
with open(filename, 'r') as f:
for line in f:
if "db" in line:
db_log.append(line)
with open("restore_log", "x") as f:
for i in db_log:
f.write(i)
f.close