Skip to content

Instantly share code, notes, and snippets.

@minhaz1 minhaz1/tail.py
Created Sep 24, 2017

Embed
What would you like to do?
#!/usr/bin/env python
import sys
def tail(filename):
f = open(filename)
while True:
pos = f.tell()
line = f.readline()
if not line:
f.seek(pos)
else:
print line,
if __name__ == '__main__':
tail(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.