Created
September 8, 2014 21:39
-
-
Save waynew/f6285ea48fc4f15f0a47 to your computer and use it in GitHub Desktop.
Naive tail for saltstack
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
def tail(filename, n=10): | |
with open(filename, 'r') as f: | |
return ''.join(f.readlines()[-n:]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment