Skip to content

Instantly share code, notes, and snippets.

@mwinkle
Created March 14, 2015 01:21
Show Gist options
  • Save mwinkle/4900848e357f80b45843 to your computer and use it in GitHub Desktop.
Save mwinkle/4900848e357f80b45843 to your computer and use it in GitHub Desktop.
Python file used to consolidate json files to a single line wtih no CR's
import sys
lines = []
for line in sys.stdin:
lines.append(line)
if len(lines) > 0:
cleaned_lines = [line.strip() for line in lines]
single_line = ' '.join(cleaned_lines)
print single_line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment