💾 Archived View for tozip.chickenkiller.com › greps captured on 2023-06-16 at 16:19:23. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-03-20)

🚧 View Differences

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

!/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])