Last active
October 17, 2019 13:18
-
-
Save fkirc/db49f94ff227bdff8541e06ee586979f to your computer and use it in GitHub Desktop.
This file contains 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/python | |
import sys | |
def read_file(f): | |
print(f.read()) | |
def main(): | |
if len(sys.argv) < 2: | |
print('Usage: ' + sys.argv[0] + ' <file>') | |
exit(-1) | |
f_name = sys.argv[1] | |
with open(f_name, 'r') as f: | |
read_file(f) | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment