Skip to content

Instantly share code, notes, and snippets.

@uoxiu
Created September 10, 2020 17:35
Show Gist options
  • Save uoxiu/a8c71806b74f9511254aff7c94ae0c38 to your computer and use it in GitHub Desktop.
Save uoxiu/a8c71806b74f9511254aff7c94ae0c38 to your computer and use it in GitHub Desktop.
import sys
import os
print(sys.argv)
with open(sys.argv[1], 'r') as f:
content = f.read()
with open(sys.argv[1], 'w') as f:
f.write(content.replace(sys.argv[2], os.environ.get(sys.argv[2], '')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment