I know that I can run a python script from my bash script using the following:
python python_script.py
But what about if I wanted to pass a
Embedded option:
Wrap python code in a bash function.
#!/bin/bash
function current_datetime {
python - <
Use environment variables, to pass data into to your embedded python script.
#!/bin/bash
function line {
PYTHON_ARG="$1" python - <
http://bhfsteve.blogspot.se/2014/07/embedding-python-in-bash-scripts.html