Skip to content

Instantly share code, notes, and snippets.

@MatthewJA
Created May 15, 2015 10:18
Show Gist options
  • Save MatthewJA/3b4fa4aba9d1608cd77c to your computer and use it in GitHub Desktop.
Save MatthewJA/3b4fa4aba9d1608cd77c to your computer and use it in GitHub Desktop.
Basic bulk script running.
#!/usr/bin/env python
from subprocess import call
from os import devnull
values = set([
# ("par1", "par2", "par3", "par4"),
# ...,
])
nullpipe = open(devnull, "w")
for params in values:
print "script.sh: %s %s %s %s"%params
call(["sh", "script.sh"] + params,
stdout=nullpipe, stderr=nullpipe)
print "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment