Skip to content

Instantly share code, notes, and snippets.

@fkirc
Last active October 17, 2019 13:18
Show Gist options
  • Save fkirc/db49f94ff227bdff8541e06ee586979f to your computer and use it in GitHub Desktop.
Save fkirc/db49f94ff227bdff8541e06ee586979f to your computer and use it in GitHub Desktop.
#!/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