Created
February 23, 2018 01:41
-
-
Save sjkillen/39e006df865afb64d1434bd627d9af52 to your computer and use it in GitHub Desktop.
Write entire contents of file to stdout and then pipe stdin to stdout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from sys import argv | |
with open(argv[1]) as f: | |
print(f.read(), end="") | |
try: | |
while True: | |
print(input(), end="") | |
except EOFError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment