Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (13 sloc) 341 Bytes
#!/usr/bin/env python3
import fileinput
import re
import sys
if len(sys.argv) <= 1:
raise Exception('Usage: skipuntil <regex> <files...>?')
matcher = re.compile(sys.argv[1])
matched = False
for line in fileinput.input(sys.argv[2:]):
if not matched and matcher.match(line):
matched = True
if matched:
You can’t perform that action at this time.