Skip to content

Instantly share code, notes, and snippets.

@fcracker79
Created January 3, 2019 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcracker79/d971c2a903a08c80ee8148ad00af667a to your computer and use it in GitHub Desktop.
Save fcracker79/d971c2a903a08c80ee8148ad00af667a to your computer and use it in GitHub Desktop.
import subprocess
class RunCmd(object):
def __init__(self, cmd):
self.cmd = cmd
def cmd_run(self):
subprocess.call(self.cmd, shell=True)
commands = [
RunCmd('cp /sh/ec_rawlog/Logs_new_{0}.txt /sh/logs/logs{0}.txt'.format(i)) for i in range(1, 10)
]
for a in commands:
a.cmd_run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment