16 lines
510 B
Python
16 lines
510 B
Python
#!/home/oracle/p3/bin/python
|
|
|
|
import os
|
|
|
|
k_scriptdir = "/mnt/yavin4/tmp/_oracle_/gitlab2/oracle/star"
|
|
scriptlist = sorted(os.listdir(k_scriptdir))
|
|
for script in scriptlist:
|
|
if script.endswith(".sql"):
|
|
scriptlen = len(script)
|
|
script_underline = "".join("~" for i in range(scriptlen +4))
|
|
print(f"{script_underline}\n~ {script} ~\n{script_underline}")
|
|
with open(k_scriptdir + "/" + script) as f:
|
|
file_contents = f.read().splitlines()
|
|
for script_line in file_contents:
|
|
print(f"\t{script_line}")
|