Skip to content

Instantly share code, notes, and snippets.

# replace base url
if [ "${CRAWLAB_BASE_URL}" = "" ];
then
:
else
indexpath=/app/dist/index.html
sed -i "s?/js/?${CRAWLAB_BASE_URL}/js/?g" ${indexpath}
sed -i "s?/css/?${CRAWLAB_BASE_URL}/css/?g" ${indexpath}
fi
import time
with open("progress.txt", "w") as f:
for i in range(20):
f.write(f"{i}\n")
f.flush()
print(i)
time.sleep(2)
print("process finished")