Created
June 13, 2015 14:46
-
-
Save offby1/2f459c91a745b387f9f8 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 | |
| from __future__ import print_function | |
| import re | |
| with open ('/etc/passwd') as inf: | |
| for line in inf: | |
| line=line.rstrip() | |
| if any(re.match(pat, line) for pat in (r'^ntp:', r'^nobody:', r'ftp:', r'gopher:')): | |
| print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment