Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

python code in bash script

The simplest approach is to just save the python script as, for example script.py and then either call it from the bash script, or call it after the bash script:

#!/usr/bin/env bash
echo "This is the bash script" &&
/path/to/script.py
Or

script.sh && script.py
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #python #code #bash #script
ADD COMMENT
Topic
Name
7+3 =