13 lines
246 B
Python
13 lines
246 B
Python
|
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
|