💾 Archived View for tozip.chickenkiller.com › greps captured on 2023-04-19 at 22:54:52.

View Raw

More Information

⬅️ Previous capture (2023-03-20)

➡️ Next capture (2023-06-16)

-=-=-=-=-=-=-

#!/usr/bin/env python3
# perform multiple greps


from os import popen
import sys

def mkset(target):
	cmd = "grep -il " + target + " *"
	return set(popen(cmd))

args = sys.argv
args = args[1:]
if len(args) == 0: exit(0)
res = mkset(args[0])
for s in args[1:]:
	res = res.intersection(mkset(s))

res = list(res)
res.sort()
for f in res:
	print(f[:-1])