view bin/dfi @ 453:c3bfb45757e9

FreeBSD grep is GNU grep. Well, up to 9.x.
author Edho Arief <edho@myconan.net>
date Fri, 15 Feb 2013 18:18:18 +0900
parents 006c273399fb
children
line wrap: on
line source

#!/usr/bin/env python

import os
import sys

rows = sys.stdin.readlines()

for row in rows:
  if row.find(' ', 1, 49) == -1:
    row = row[0:48] + ' ' + row[48:]
  data = row.split(None, 5)
  print '|'.join(data)