Created
September 24, 2017 06:32
-
-
Save minhaz1/e5370970175e4cde4d1f06f3400d04fe to your computer and use it in GitHub Desktop.
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/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