how to execute snippet python in bash scripts
程序员文章站
2023-12-30 16:57:04
...
if you want to call a python shell in bash code,you can do like this.
#! /bin/bash
echo "hello world"
/usr/bin/python <<-EOF
print("hello world")
print("hello world")
print("hello world")
EOF
echo "hello bash")