I am writing this script that executes a bunch of commands one of which is to download some packages from a certain url.
Following is my script
#! /usr/bin/env python
#! /usr/bin/env bash
import os
import sys
import subprocess
url = sys.argv[1]
getRpm = "'wget %s' %url"
searchRpm = "rpm -qa|grep sys.*"
execsCmds = [getRpm,searchRpm]
def runCommands(commands=execsCmds):
for cmd in execsCmds:
print "Running Command"
subprocess.call(cmd, shell=True)
runCommands()
When I execute is it says:
/bin/sh: wget %s: command not found