24 lines
700 B
Python
24 lines
700 B
Python
|
#!/usr/bin/python
|
||
|
import re
|
||
|
import sys
|
||
|
|
||
|
if len(sys.argv) != 2:
|
||
|
print(f"Usage: {sys.argv[0]} FILE")
|
||
|
sys.exit(1)
|
||
|
|
||
|
with open(sys.argv[1]) as f:
|
||
|
line = ""
|
||
|
for l in f:
|
||
|
if len(l) == 77 and l[-2] == "=":
|
||
|
line += l[:-2]
|
||
|
else:
|
||
|
line += l
|
||
|
if not re.match("NetApp Security WARNING:", line):
|
||
|
line = re.sub("^\+ ", "+ ", line, count=1)
|
||
|
line = re.sub("^\- ", "- ", line, count=1)
|
||
|
line = re.sub("^ ", " ", line, count=1)
|
||
|
line = re.sub(" ", " ", line)
|
||
|
line = re.sub("=3D", "=", line)
|
||
|
print(line, end="")
|
||
|
line = ""
|