#!/usr/bin/python import os,sys data = sys.stdin.read() fd = os.popen("/bin/grep --files-with-match 0", "w") try: fd.write(data) ret = fd.close() except IOError: print('io-error')