Skip to content

Instantly share code, notes, and snippets.

@kragniz
Last active January 2, 2016 12:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kragniz/8306558 to your computer and use it in GitHub Desktop.
Save kragniz/8306558 to your computer and use it in GitHub Desktop.
Extract urls from debian error messages
#!/usr/bin/env python
import re, sys
for l in sys.stderr.readlines():
url = re.findall(r'http:.+\.deb', l)
if len(url):
print url[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment