I'm trying to pass variables from python script to bash, but not able to invoke the variable in bash.
clustername=sys.argv[1]
subprocess.check_call("/data/path/script.sh '%s'" % str(clustername), shell=True, stdout=subprocess.PIPE, universal_newlines=True)
And tried to print subprocess
output, but was not able to print.
It is returning only code
Below is the bash script:
#!/bin/bash
clustername=$clustername # invoking from pythonscript
------
---Some logic -
---end