zoukankan      html  css  js  c++  java
  • curl post的shell

    outputfile="/home/app/java_trans/"
    cd $outputfile
    #得到command执行结果 sourceMobile
    =$(awk '{print $0}' output.txt |xargs |sed 's/ /\",\"/g') #echo $sourceMobile mobiles=""[\"${sourceMobile}\"]"" #echo $mobiles #mobiles2=""[\"9TDYwD2BqLVpx6/4LpQ==\",\"wE2xSOYDCHt/TcqU/A==\"]"" #echo $mobiles2
    #字符串拼接 bodydata
    ="'{"fileName":"A40320200925163333000130_2000.txt","flag":"0","data":${mobiles}}'" url="https://badi/yzfdafdf/send" #echo $bodydata posturl="curl -H "Content-Type:application/json" -X POST -d ${bodydata} ${url}" echo $posturl eval $posturl #curl -H "Content-Type:application/json" -X POST -d '{"fileName":"A40320200925163333000130_2000.txt","flag":"0","data":"["9TDYwD2BqLVpxe/4LpQ==","wE2xSOYDCHUHXncqU/A=="]"}' https://badi/yzfdafdf/send

     参考了这个文章

    查看二

  • 相关阅读:
    使用VS2015将解决方案同步更新到Github上
    SQL Server循环
    OSPF
    OPSF
    OSPF
    pandas更换index,column名称
    pandas的时间戳
    pandas选择单元格,选择行列
    BGP
    BGP
  • 原文地址:https://www.cnblogs.com/zhucezmf/p/14205657.html
Copyright © 2011-2022 走看看