Portal Home > Knowledgebase > Articles Database > BASH Script calling Python script
BASH Script calling Python script
Posted by stuartornum, 10-10-2012, 10:12 AM |
Hi,
I'm not sure what the best way to achieve this..., here is what I have.
I have a Python script that outputs a curl command like below:
I would like the bash script to call the Python script and then the *BASH* script to execute the above command. If I could somehow capture the Python scripts output as a BASH variable and then execute that variable at a later time... thats would be perfect!
Just to clarify, I do not want the Python script to actually execute the command, the BASH script must do it.
Many thanks in advanced!
|
Posted by Adam-AEC, 10-10-2012, 10:48 AM |
Backticks are a bit more portable, but $() syntax is sometimes easier to read.
|
Posted by stuartornum, 10-10-2012, 11:06 AM |
Perfect - thank you!
|
Add to Favourites Print this Article
Also Read