Update port_pure.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent bc83d07921
commit ec67c3103f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      port_pure.sh

@ -19,11 +19,11 @@ until [[ $ALL =~ 'TW_1' ]]; do
ALL=$(wget -qO- --header="cookie: $TOKEN" https://tcp$STACK.ping.pe/ajax_getPingResults_v2.php?stream_id=$STREAM_ID)
done
printf "%-10s %-10s %-10s\n" 地方 ISP 状态
printf "%-30s %-30s %-30s\n" 地方 ISP 状态
#echo -e "地方\tISP\t\t状态"
for ((i=0;i<${#NODE_ID[@]};i++)); do
RESULT[i]=$(echo $ALL | python3 -m json.tool | grep -A 2 ${NODE_ID[i]} | grep result | sed "s#[\":, ]##g")
RESULT[i]=${RESULT[i]:-'result1'}
printf "%-10s %-10s %-10s\n" ${NODE_ZH[i]} $(eval echo "\$${RESULT[i]}")
printf "%-30s %-30s %-30s\n" ${NODE_ZH[i]} $(eval echo "\$${RESULT[i]}")
# echo -e "${NODE_ZH[i]}\t\t$(eval echo "\$${RESULT[i]}")"
done

Loading…
Cancel
Save