#!/bin/bash aa=$1 result=$(curl -H "Content-type: application/json" -X POST -o /dev/null -s -w %{http_code} -d ‘[{"aa":"‘${aa}‘","bb":"0","cc":"0"}]‘ URL) echo $result
-o /dev/null 屏蔽原有输出信息
-s silent
-w %{http_code} 控制额外输出
原文地址:http://www.cnblogs.com/lwmp/p/7650403.html
时间: 2024-10-10 05:16:15