一、通过EOF符号嵌入
python3 << EOF
import re
s = 'hello123your78,_+8ui?direc...'
ret = re.findall('\d+', s)
print(ret)
EOF
echo 'OK'
二、执行单行python命令
python -c "import sys; print(sys.executable)"
# 复杂命令要用[]括起来
python3 -c "import os,time;[print(i) for i in os.listdir('/home/hddl')],[print(time.time())]"