天天看點

shell接收python print的值

parser_coverage_info.py 中包含了print資訊,print兩個值,如果要shell接收python傳回的值,可如下方式擷取:

​aa=`python parser_coverage_info.py coverage_res`

echo == $aa
IFS=' ' arr=($aa)
echo ${arr[0]}
echo ${arr[1]}