Skip to content

Instantly share code, notes, and snippets.

@mbarton
Created August 6, 2014 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mbarton/aecf158836a3530b90c7 to your computer and use it in GitHub Desktop.
Save mbarton/aecf158836a3530b90c7 to your computer and use it in GitHub Desktop.
Make a single log file readable
#!/usr/bin/python
import fileinput
import sys
for line in fileinput.input():
split_line = line.split(" ")
sys.stdout.write("%s %s %s" % (split_line[0], split_line[1], " ".join(split_line[4:])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment