Skip to content

Instantly share code, notes, and snippets.

@supr
Last active December 12, 2015 07:09
Show Gist options
  • Save supr/4734838 to your computer and use it in GitHub Desktop.
Save supr/4734838 to your computer and use it in GitHub Desktop.
import re
import sys
f = open(sys.argv[1])
content = f.read()
for i in filter(lambda x: not re.match(r'^#', x.strip()), re.split('startup|;', content)):
if i.strip():
print "startup" + i + ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment